summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-01-27 20:47:59 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-01-27 20:47:59 +0100
commit086b06553b1b792577e9f663ae7721385696483e (patch)
tree80a1c6728bb2d9c30ee742adfa0f31f456316529 /examples
parente1ad0910f0a383372a481cab4545c4e20805b41c (diff)
downloadiced-086b06553b1b792577e9f663ae7721385696483e.tar.gz
iced-086b06553b1b792577e9f663ae7721385696483e.tar.bz2
iced-086b06553b1b792577e9f663ae7721385696483e.zip
Remove unnecessary `endpoint` function in `gallery` example
Diffstat (limited to 'examples')
-rw-r--r--examples/gallery/src/civitai.rs8
1 files changed, 1 insertions, 7 deletions
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 {