mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-09 19:46:43 +02:00
feat: appeased the clippy gods
This commit is contained in:
parent
0add1c7c52
commit
b7141598dc
4 changed files with 6 additions and 6 deletions
|
@ -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,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -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 => '✅',
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue