removed clippy warnings

This commit is contained in:
Thomas Eppers 2021-11-01 13:09:09 +01:00
parent cefe57b980
commit 0ace41f545
3 changed files with 1 additions and 8 deletions

View File

@ -1,6 +1,5 @@
use serde::Deserialize; use serde::Deserialize;
use crate::repo;
use crate::repository::Error; use crate::repository::Error;
#[derive(Deserialize, Debug, Clone)] #[derive(Deserialize, Debug, Clone)]

View File

@ -1,6 +1,5 @@
use serde::Deserialize; use serde::Deserialize;
use crate::repo;
use crate::repository::Error; use crate::repository::Error;
#[derive(Deserialize)] #[derive(Deserialize)]
@ -10,7 +9,6 @@ struct Token {
#[derive(Deserialize)] #[derive(Deserialize)]
pub struct Ghcr { pub struct Ghcr {
name: String,
tags: Vec<String>, tags: Vec<String>,
} }

View File

@ -84,7 +84,6 @@ impl Tag {
} }
pub struct Repo { pub struct Repo {
// name: String,
tags: Vec<Tag>, tags: Vec<Tag>,
next_page: Option<String>, next_page: Option<String>,
} }
@ -99,14 +98,11 @@ impl Repo {
Err(e) => return Err(Error::Converting(format!("{}", e))), Err(e) => return Err(Error::Converting(format!("{}", e))),
}; };
//TODO change according to registry if registry.unwrap_or_default() == "ghcr.io" {
if registry.unwrap_or(String::new()) == "ghcr.io" {
ghcr::Ghcr::create_repo(&repo) ghcr::Ghcr::create_repo(&repo)
} else { } else {
dockerhub::DockerHub::create_repo(&repo) dockerhub::DockerHub::create_repo(&repo)
} }
// dockerhub::DockerHub::create_repo(&repo)
} }
pub fn with_url(url: &str) -> Result<Self, Error> { pub fn with_url(url: &str) -> Result<Self, Error> {