cargo fmt

This commit is contained in:
delta 2022-07-11 09:07:43 +02:00
parent e0f896e23e
commit 0854a70100
2 changed files with 3 additions and 5 deletions

View file

@ -60,19 +60,17 @@ impl<'a> StrChunks<'a> {
}
async fn create_prefix(msg: &Message, is_reply: bool, http: impl CacheHttp) -> (String, usize) {
let mut nick = match msg.member(http).await {
Ok(Member {
nick: Some(nick), ..
}) => Cow::Owned(nick),
_ => Cow::Borrowed(&msg.author.name),
};
if option_env!("DIRCORD_POLARIAN_MODE").is_some() {
nick = Cow::Owned("polarbear".to_string());
}
let mut chars = nick.char_indices();
let first_char = chars.next().unwrap().1;
let second_char_offset = chars.next().unwrap().0;

View file

@ -69,7 +69,7 @@ pub async fn irc_loop(
};
let mut nickname = unwrap_or_continue!(orig_message.source_nickname());
if option_env!("DIRCORD_POLARIAN_MODE").is_some() {
nickname = "polarbear";
}