From 279daed5552a62c7e37ef5d31923564be6b403ea Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Mon, 29 May 2023 23:37:27 -0400 Subject: [PATCH] remove warnings --- src/api/auth.rs | 6 +++--- src/api/mod.rs | 1 - src/dto/user.rs | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/auth.rs b/src/api/auth.rs index 3b53e3f..b24a24b 100644 --- a/src/api/auth.rs +++ b/src/api/auth.rs @@ -1,4 +1,4 @@ -use std::{sync::Arc, collections::{HashMap, BTreeMap}, time::{SystemTime, UNIX_EPOCH}}; +use std::{sync::Arc, collections::{HashMap, BTreeMap}, time::SystemTime}; use axum::{extract::{Query, State}, response::{IntoResponse, Response}, http::{StatusCode, header}, Form}; use axum_auth::AuthBasic; @@ -12,10 +12,10 @@ use sha2::Sha256; use rand::Rng; -use crate::{dto::{scope::Scope, user::{UserAuth, TokenInfo}}, app_state::AppState}; +use crate::{dto::{scope::Scope, user::TokenInfo}, app_state::AppState}; use crate::database::Database; -use crate::auth::{unauthenticated_response, AuthDriver}; +use crate::auth::unauthenticated_response; #[derive(Deserialize, Debug)] pub struct TokenAuthRequest { diff --git a/src/api/mod.rs b/src/api/mod.rs index ddf2574..b47ea7c 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -14,7 +14,6 @@ pub mod tags; pub mod catalog; pub mod auth; -use crate::auth::AuthToken; use crate::dto::user::UserAuth; /// https://docs.docker.com/registry/spec/api/#api-version-check diff --git a/src/dto/user.rs b/src/dto/user.rs index ad50dcc..6ba557a 100644 --- a/src/dto/user.rs +++ b/src/dto/user.rs @@ -128,6 +128,7 @@ pub struct RegistryUser { repository_permissions: HashMap, } +#[allow(dead_code)] impl RegistryUser { pub fn new(user_type: RegistryUserType, repository_permissions: HashMap) -> Self { Self {