1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-08-07 15:20:55 +00:00

fix new lints; clippy::unnecessary-map-or

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-11-28 23:33:33 +00:00
parent 2a9bb1ce11
commit 58be22e695
9 changed files with 10 additions and 17 deletions

View file

@ -24,10 +24,7 @@ pub(super) fn get_prefix(&self) -> Vec<u8> {
},
Self::Appservice(server) => {
let sigil = b"+";
let len = sigil
.len()
.saturating_add(server.as_bytes().len())
.saturating_add(1);
let len = sigil.len().saturating_add(server.len()).saturating_add(1);
let mut p = Vec::with_capacity(len);
p.extend_from_slice(sigil);
@ -41,7 +38,7 @@ pub(super) fn get_prefix(&self) -> Vec<u8> {
.len()
.saturating_add(user.as_bytes().len())
.saturating_add(1)
.saturating_add(pushkey.as_bytes().len())
.saturating_add(pushkey.len())
.saturating_add(1);
let mut p = Vec::with_capacity(len);