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