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)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
|
#[allow(clippy::module_name_repetitions)]
|
||||||
pub struct DatabaseConfig {
|
pub struct DatabaseConfig {
|
||||||
pub connection_string: String,
|
pub connection_string: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
#[serde(tag = "type")]
|
#[serde(tag = "type")]
|
||||||
|
#[allow(clippy::module_name_repetitions)]
|
||||||
pub enum AuthBackendConfig {
|
pub enum AuthBackendConfig {
|
||||||
#[serde(rename = "LDAP")]
|
#[serde(rename = "LDAP")]
|
||||||
Ldap(LdapBackendConfig),
|
Ldap(LdapBackendConfig),
|
||||||
|
@ -29,6 +31,7 @@ pub enum AuthBackendConfig {
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
|
#[allow(clippy::module_name_repetitions)]
|
||||||
pub struct LdapBackendConfig {
|
pub struct LdapBackendConfig {
|
||||||
pub server_address: String,
|
pub server_address: String,
|
||||||
pub search_base: String,
|
pub search_base: String,
|
||||||
|
|
|
@ -96,9 +96,12 @@ impl Database for SqliteDatabase {
|
||||||
valid,
|
valid,
|
||||||
created,
|
created,
|
||||||
last_used,
|
last_used,
|
||||||
}| match valid {
|
}| {
|
||||||
true => UserTokenEntry::Valid(UserToken::from(token), created, last_used),
|
if valid {
|
||||||
false => UserTokenEntry::Invalid(UserToken::from(token), created, last_used),
|
UserTokenEntry::Valid(UserToken::from(token), created, last_used)
|
||||||
|
} else {
|
||||||
|
UserTokenEntry::Invalid(UserToken::from(token), created, last_used)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue