diff --git a/src/repository/dockerhub.rs b/src/repository/dockerhub.rs index 5d626ef..b2f58dd 100644 --- a/src/repository/dockerhub.rs +++ b/src/repository/dockerhub.rs @@ -1,6 +1,5 @@ use serde::Deserialize; -use crate::repo; use crate::repository::Error; #[derive(Deserialize, Debug, Clone)] diff --git a/src/repository/ghcr.rs b/src/repository/ghcr.rs index f46050c..c0ba1c7 100644 --- a/src/repository/ghcr.rs +++ b/src/repository/ghcr.rs @@ -1,6 +1,5 @@ use serde::Deserialize; -use crate::repo; use crate::repository::Error; #[derive(Deserialize)] @@ -10,7 +9,6 @@ struct Token { #[derive(Deserialize)] pub struct Ghcr { - name: String, tags: Vec, } diff --git a/src/repository/mod.rs b/src/repository/mod.rs index b1283f1..53b7e17 100644 --- a/src/repository/mod.rs +++ b/src/repository/mod.rs @@ -84,7 +84,6 @@ impl Tag { } pub struct Repo { - // name: String, tags: Vec, next_page: Option, } @@ -99,14 +98,11 @@ impl Repo { Err(e) => return Err(Error::Converting(format!("{}", e))), }; - //TODO change according to registry - if registry.unwrap_or(String::new()) == "ghcr.io" { + if registry.unwrap_or_default() == "ghcr.io" { ghcr::Ghcr::create_repo(&repo) } else { dockerhub::DockerHub::create_repo(&repo) } - - // dockerhub::DockerHub::create_repo(&repo) } pub fn with_url(url: &str) -> Result {