Skip to content

Commit

Permalink
Update logging.rs
Browse files Browse the repository at this point in the history
Now returns none only if feature flag does not exist
  • Loading branch information
wynter1888 committed May 23, 2024
1 parent a5f048f commit ab77119
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/common/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub async fn get_log_channel(
.await
.unwrap();

if feature_flags
if !feature_flags
.iter()
.find(|flag| flag.feature == "logging")
.unwrap()
Expand All @@ -28,7 +28,7 @@ pub async fn get_log_channel(

match log_type {
LogType::Action => {
if feature_flags
if !feature_flags
.iter()
.find(|flag| flag.feature == "logging.action")
.unwrap()
Expand All @@ -39,7 +39,7 @@ pub async fn get_log_channel(
}
}
LogType::Message => {
if feature_flags
if !feature_flags
.iter()
.find(|flag| flag.feature == "logging.message")
.unwrap()
Expand All @@ -50,7 +50,7 @@ pub async fn get_log_channel(
}
}
LogType::Voice => {
if feature_flags
if !feature_flags
.iter()
.find(|flag| flag.feature == "logging.voice")
.unwrap()
Expand Down

0 comments on commit ab77119

Please sign in to comment.