diff --git a/src/models/client.rs b/src/models/client.rs index 6138594d..4cd3552f 100644 --- a/src/models/client.rs +++ b/src/models/client.rs @@ -7,7 +7,7 @@ use crate::ConcreteConnection; use self::schema::clients; -use chrono::{NaiveDateTime, Utc}; +use chrono::NaiveDateTime; const SECRET_LENGTH: usize = 64; diff --git a/src/models/user.rs b/src/models/user.rs index a03053c5..96be5991 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -17,17 +17,17 @@ const BCRYPT_SETUP: BcryptSetup = BcryptSetup { #[derive(DbEnum, Debug, Serialize, Clone)] pub enum UserState { - pending, - active, - disabled, + Pending, + Active, + Disabled, } impl fmt::Display for UserState { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { - UserState::pending => write!(f, "Pending"), - UserState::active => write!(f, "Active"), - UserState::disabled => write!(f, "Disabled"), + UserState::Pending => write!(f, "Pending"), + UserState::Active => write!(f, "Active"), + UserState::Disabled => write!(f, "Disabled"), } } }