diff options
author | Erik Johnston <erik@matrix.org> | 2022-09-07 16:14:51 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2022-09-09 15:10:52 +0100 |
commit | bbba09e583e96d7e54086b47707e4a0b9f995cc2 (patch) | |
tree | 30b98eb7839d827c6819a03bc424b0bce4f3f382 /rust/src/push/utils.rs | |
parent | Fixup (diff) | |
download | synapse-bbba09e583e96d7e54086b47707e4a0b9f995cc2.tar.xz |
fix up
Diffstat (limited to 'rust/src/push/utils.rs')
-rw-r--r-- | rust/src/push/utils.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/src/push/utils.rs b/rust/src/push/utils.rs index 37e5f7fc10..d070d8f0d2 100644 --- a/rust/src/push/utils.rs +++ b/rust/src/push/utils.rs @@ -13,7 +13,7 @@ pub(crate) fn get_localpart_from_id(id: &str) -> Result<&str, Error> { .with_context(|| format!("ID does not contain colon: {id}"))?; // We need to strip off the first character, which is the ID type. - if localpart.len() == 0 { + if localpart.is_empty() { bail!("Invalid ID {id}"); } |