From 086b06553b1b792577e9f663ae7721385696483e Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 27 Jan 2025 20:47:59 +0100 Subject: Remove unnecessary `endpoint` function in `gallery` example --- examples/gallery/src/civitai.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'examples') diff --git a/examples/gallery/src/civitai.rs b/examples/gallery/src/civitai.rs index 5844fdfc..7a8f1c45 100644 --- a/examples/gallery/src/civitai.rs +++ b/examples/gallery/src/civitai.rs @@ -22,7 +22,7 @@ impl Image { } let response: Response = client - .get(endpoint("/images")) + .get("https://civitai.com/api/v1/images") .query(&[ ("sort", "Most Reactions"), ("period", "Week"), @@ -108,12 +108,6 @@ pub enum Size { Thumbnail, } -fn endpoint(path: &str) -> String { - const API_URL: &str = "https://civitai.com/api/v1"; - - format!("{API_URL}{path}") -} - #[derive(Debug, Clone)] #[allow(dead_code)] pub enum Error { -- cgit