mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 13:16:56 +00:00
style: Don't return Allow in an else block
This commit is contained in:
2 files changed
+7
-6
No files matched your search
@@ -18,6 +18,7 @@ use wildmatch::WildMatch;
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum FilterLevel {
|
||||
Allow,
|
||||
ExplicitAllow,
|
||||
Ignore,
|
||||
Block,
|
||||
}
|
||||
@@ -124,7 +125,7 @@ impl InvitePermissionConfigEventContent {
|
||||
} else if !self.enabled {
|
||||
FilterLevel::Allow
|
||||
} else if Self::matches(&self.allowed_users, user.as_str()) {
|
||||
FilterLevel::Allow
|
||||
FilterLevel::ExplicitAllow
|
||||
} else if Self::matches(&self.ignored_users, user.as_str()) {
|
||||
FilterLevel::Ignore
|
||||
} else if Self::matches(&self.blocked_users, user.as_str()) {
|
||||
@@ -144,7 +145,7 @@ impl InvitePermissionConfigEventContent {
|
||||
} else {
|
||||
let server = server.host();
|
||||
if Self::matches(&self.allowed_servers, server) {
|
||||
FilterLevel::Allow
|
||||
FilterLevel::ExplicitAllow
|
||||
} else if Self::matches(&self.ignored_servers, server) {
|
||||
FilterLevel::Ignore
|
||||
} else if Self::matches(&self.blocked_servers, server) {
|
||||
|
||||
Reference in new issue
Block a user