Run rustfmt
This commit is contained in:
parent
aaf1697a52
commit
66280535a6
19
src/main.rs
19
src/main.rs
|
@ -217,7 +217,7 @@ async fn irc_loop(
|
|||
for member in &members {
|
||||
let nick = match &member.nick {
|
||||
Some(s) => s.to_owned(),
|
||||
None => member.user.name.clone()
|
||||
None => member.user.name.clone(),
|
||||
};
|
||||
|
||||
if nick == slice {
|
||||
|
@ -231,7 +231,6 @@ async fn irc_loop(
|
|||
mentioned_1 = None;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if PING_RE_2.is_match(message) {
|
||||
|
@ -296,13 +295,17 @@ async fn irc_loop(
|
|||
let slice = &message[mat.start() + 1..mat.end()];
|
||||
if let Some(cached) = id_cache.get(slice) {
|
||||
if let &Some(id) = cached {
|
||||
computed = PING_RE_2.replace(&computed, format!("<@{}>", id)).to_string();
|
||||
computed = PING_RE_2
|
||||
.replace(&computed, format!("<@{}>", id))
|
||||
.to_string();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(id) = mentioned_1 {
|
||||
computed = PING_NICK_1.replace(&computed, format!("<@{}>", id)).to_string();
|
||||
computed = PING_NICK_1
|
||||
.replace(&computed, format!("<@{}>", id))
|
||||
.to_string();
|
||||
}
|
||||
|
||||
w.username(nickname);
|
||||
|
@ -317,13 +320,17 @@ async fn irc_loop(
|
|||
let slice = &message[mat.start() + 1..mat.end()];
|
||||
if let Some(cached) = id_cache.get(slice) {
|
||||
if let &Some(id) = cached {
|
||||
computed = PING_RE_2.replace(&computed, format!("<@{}>", id)).to_string();
|
||||
computed = PING_RE_2
|
||||
.replace(&computed, format!("<@{}>", id))
|
||||
.to_string();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(id) = mentioned_1 {
|
||||
computed = PING_NICK_1.replace(&computed, format!("<@{}>", id)).to_string();
|
||||
computed = PING_NICK_1
|
||||
.replace(&computed, format!("<@{}>", id))
|
||||
.to_string();
|
||||
}
|
||||
|
||||
channel_id
|
||||
|
|
Loading…
Reference in a new issue