Simplify enum objects #39

Merged
modulatingforce merged 5 commits from Simplify-objects into main 2024-03-23 16:50:04 -04:00
Showing only changes of commit 0f1cb576a4 - Show all commits

View file

@ -1283,22 +1283,19 @@ impl IdentityManager {
// Checks if broadcaster
let channel_out = match channel {
Some(channel_tmp) => {
match channel_tmp {
Channel(channel_tmp) => {
// In this block, Some input channel is given
// We're comparing the channel name with chattername to determine if they're a broadcaster
if chattername == channel_tmp.to_lowercase() {
evalsproles.push(UserRole::Broadcaster);
}
Some(Channel::construct(channel_tmp))
} // _ => ()
Some(chnl) => {
// In this block, Some input channel is given
// We're comparing the channel name with chattername to determine if they're a broadcaster
if chattername == chnl.0
{
evalsproles.push(UserRole::Broadcaster);
}
}
Some(chnl)
},
None => None,
};
let rolesdb = Arc::clone(&self.special_roles_users);
let rolesdb_lock = rolesdb.read().await;