aboutsummaryrefslogtreecommitdiff
path: root/src/mailstore.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-06-03 17:37:39 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-06-03 17:37:39 +0200
commite950931c5f145c05353aa377f99fb2daac37d044 (patch)
tree2c7fd58299432853ec905cd5f7a2ab7376de5fba /src/mailstore.rs
parent3589b0fa4b290ebbe416d793b9f82673754ab6f9 (diff)
downloadaerogramme-e950931c5f145c05353aa377f99fb2daac37d044.tar.gz
aerogramme-e950931c5f145c05353aa377f99fb2daac37d044.zip
Run cargo fmt
Diffstat (limited to 'src/mailstore.rs')
-rw-r--r--src/mailstore.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mailstore.rs b/src/mailstore.rs
index e4387cb..2bcc592 100644
--- a/src/mailstore.rs
+++ b/src/mailstore.rs
@@ -19,16 +19,15 @@ impl Mailstore {
name: config.aws_region,
endpoint: config.k2v_endpoint,
};
- let login_provider: Box<dyn LoginProvider + Send + Sync> = match (config.login_static, config.login_ldap)
- {
- (Some(st), None) => Box::new(StaticLoginProvider::new(st, k2v_region, s3_region)?),
- (None, Some(ld)) => Box::new(LdapLoginProvider::new(ld, k2v_region, s3_region)?),
- (Some(_), Some(_)) => bail!("A single login provider must be set up in config file"),
- (None, None) => bail!("No login provider is set up in config file"),
- };
+ let login_provider: Box<dyn LoginProvider + Send + Sync> =
+ match (config.login_static, config.login_ldap) {
+ (Some(st), None) => Box::new(StaticLoginProvider::new(st, k2v_region, s3_region)?),
+ (None, Some(ld)) => Box::new(LdapLoginProvider::new(ld, k2v_region, s3_region)?),
+ (Some(_), Some(_)) => {
+ bail!("A single login provider must be set up in config file")
+ }
+ (None, None) => bail!("No login provider is set up in config file"),
+ };
Ok(Arc::new(Self { login_provider }))
}
}
-
-
-