summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJos van den Oever <jos@vandenoever.info>2018-09-12 09:38:39 +0200
committerKartikaya Gupta (kats) <staktrace@users.noreply.github.com>2018-09-12 05:27:59 -0400
commitcf0554329324f07026b411103f84e50c1252734e (patch)
tree37a976050e4179a443ce62c93b9014082a824069
parent30baefc366c26a31318fd9053b768fa50616c344 (diff)
downloadmailparse-cf0554329324f07026b411103f84e50c1252734e.tar.gz
mailparse-cf0554329324f07026b411103f84e50c1252734e.tar.xz
key.len() > 0 -> !key.is_empty()
clippy::len_zero
-rw-r--r--src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 96c01ca..ed0c5d7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -103,7 +103,7 @@ fn find_from(line: &str, ix_start: usize, key: &str) -> Option<usize> {
}
fn find_from_u8(line: &[u8], ix_start: usize, key: &[u8]) -> Option<usize> {
- assert!(key.len() > 0);
+ assert!(!key.is_empty());
assert!(ix_start < line.len());
let ix_end = line.len() - key.len();
if ix_start <= ix_end {