feat: appeased the clippy gods

This commit is contained in:
NinekoTheCat 2023-12-24 20:21:40 +01:00
parent 0add1c7c52
commit b7141598dc
No known key found for this signature in database
GPG key ID: 700DB3F678A4AB66
4 changed files with 6 additions and 6 deletions

View file

@ -67,7 +67,7 @@ impl Data for KeyValueDatabase {
None => return, None => return,
}; };
set.insert(AclDatabaseEntry { set.insert(AclDatabaseEntry {
mode: mode, mode,
hostname: parsed_host, hostname: parsed_host,
}); });
}); });

View file

@ -24,7 +24,7 @@ pub enum AclMode {
} }
impl AclMode { impl AclMode {
pub fn to_emoji(&self) -> char { pub fn to_emoji(self) -> char {
match self { match self {
AclMode::Block => '❎', AclMode::Block => '❎',
AclMode::Allow => '✅', AclMode::Allow => '✅',

View file

@ -44,7 +44,7 @@ impl Service {
pub fn add_acl(&self, host: Host, mode: AclMode) -> crate::Result<()> { pub fn add_acl(&self, host: Host, mode: AclMode) -> crate::Result<()> {
self.db.add_acl(AclDatabaseEntry { self.db.add_acl(AclDatabaseEntry {
mode: mode, mode,
hostname: host, hostname: host,
}) })
} }
@ -59,7 +59,7 @@ impl Service {
); );
return false; return false;
}; };
return self.is_federation_with_allowed(hostname); self.is_federation_with_allowed(hostname)
} }
/// same as federation_with_allowed however it can work with the fedi_dest type /// same as federation_with_allowed however it can work with the fedi_dest type
@ -70,7 +70,7 @@ impl Service {
warn!("cannot deserialise hostname for server with name {:?}", srv); warn!("cannot deserialise hostname for server with name {:?}", srv);
return false; return false;
}; };
return self.is_federation_with_allowed(hostname); self.is_federation_with_allowed(hostname)
} }
/// is federation allowed with this particular server? /// is federation allowed with this particular server?
pub fn is_federation_with_allowed(&self, server_host_name: Host<String>) -> bool { pub fn is_federation_with_allowed(&self, server_host_name: Host<String>) -> bool {

View file

@ -122,7 +122,7 @@ impl Services {
globals: globals::Service::load(db, config)?, globals: globals::Service::load(db, config)?,
acl: acl::Service { acl: acl::Service {
db: db, db,
acl_config: acl_conf, acl_config: acl_conf,
}, },
}) })