Appease clippy
This commit is contained in:
parent
011ee55fc0
commit
271714dd37
2 changed files with 9 additions and 3 deletions
|
@ -16,12 +16,14 @@ pub struct Config {
|
|||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
#[allow(clippy::module_name_repetitions)]
|
||||
pub struct DatabaseConfig {
|
||||
pub connection_string: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[serde(tag = "type")]
|
||||
#[allow(clippy::module_name_repetitions)]
|
||||
pub enum AuthBackendConfig {
|
||||
#[serde(rename = "LDAP")]
|
||||
Ldap(LdapBackendConfig),
|
||||
|
@ -29,6 +31,7 @@ pub enum AuthBackendConfig {
|
|||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
#[allow(clippy::module_name_repetitions)]
|
||||
pub struct LdapBackendConfig {
|
||||
pub server_address: String,
|
||||
pub search_base: String,
|
||||
|
|
|
@ -96,9 +96,12 @@ impl Database for SqliteDatabase {
|
|||
valid,
|
||||
created,
|
||||
last_used,
|
||||
}| match valid {
|
||||
true => UserTokenEntry::Valid(UserToken::from(token), created, last_used),
|
||||
false => UserTokenEntry::Invalid(UserToken::from(token), created, last_used),
|
||||
}| {
|
||||
if valid {
|
||||
UserTokenEntry::Valid(UserToken::from(token), created, last_used)
|
||||
} else {
|
||||
UserTokenEntry::Invalid(UserToken::from(token), created, last_used)
|
||||
}
|
||||
},
|
||||
))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue