Fix more linter warnings
This commit is contained in:
@@ -599,27 +599,25 @@ impl Command<State, Extras> for MaskCommand {
|
||||
|
||||
if let Some(channel) = channel
|
||||
&& let Some(call_id) = channel.call_id
|
||||
{
|
||||
if let Some(mut participant) = Participant::get_for_user_and_channel_in_call(
|
||||
&& let Some(mut participant) = Participant::get_for_user_and_channel_in_call(
|
||||
ctx.extras.user.id,
|
||||
ctx.event.channel_id.get(),
|
||||
call_id,
|
||||
&ctx.rt.state.db,
|
||||
)
|
||||
.await?
|
||||
{
|
||||
participant.is_masked = ctx.extras.user.is_masked;
|
||||
participant.upsert(&ctx.rt.state.db).await?;
|
||||
{
|
||||
participant.is_masked = ctx.extras.user.is_masked;
|
||||
participant.upsert(&ctx.rt.state.db).await?;
|
||||
|
||||
if ctx.extras.user.is_masked {
|
||||
mask_message = format!(
|
||||
"🎭 Your mask {mask_verb} set to `on`. You're currently being displayed as **{} {}**. You can toggle your mask on or off using `{}mask on` and `{}mask off`.",
|
||||
get_mask_emoji(&participant.user_mask).expect("User's mask did not exist"),
|
||||
get_mask_display_name(&participant.user_mask),
|
||||
ctx.prefix,
|
||||
ctx.prefix
|
||||
);
|
||||
}
|
||||
if ctx.extras.user.is_masked {
|
||||
mask_message = format!(
|
||||
"🎭 Your mask {mask_verb} set to `on`. You're currently being displayed as **{} {}**. You can toggle your mask on or off using `{}mask on` and `{}mask off`.",
|
||||
get_mask_emoji(&participant.user_mask).expect("User's mask did not exist"),
|
||||
get_mask_display_name(&participant.user_mask),
|
||||
ctx.prefix,
|
||||
ctx.prefix
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -111,9 +111,9 @@ pub fn u64_to_i64(u: u64) -> i64 {
|
||||
/// Returns:
|
||||
/// [`Option<(&str, &str)>`] - The splitted parts of the string, or [`None`] if no occurrences of
|
||||
/// `pattern` were found in `s`.
|
||||
pub fn split_at_nth_from_end<'a, 'b>(
|
||||
pub fn split_at_nth_from_end<'a>(
|
||||
s: &'a str,
|
||||
pattern: &'b str,
|
||||
pattern: &str,
|
||||
n: usize,
|
||||
) -> Option<(&'a str, &'a str)> {
|
||||
let mut end = s.len();
|
||||
|
||||
Reference in New Issue
Block a user