Skip to content

Commit ed005c7

Browse files
committed
fix: clippy errors
1 parent 531f35e commit ed005c7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
test:
22
@cargo test -p $(lib) --lib -- --nocapture
3+
4+
lint:
5+
cargo clippy --all-targets --all-features

crates/valid_anagram/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use std::collections::HashMap;
22

3+
#[must_use]
4+
#[allow(clippy::needless_pass_by_value)]
35
pub fn is_anagram(s: String, t: String) -> bool {
46
if s.len() != t.len() {
57
return false;
@@ -31,6 +33,6 @@ mod tests {
3133

3234
#[test]
3335
fn different_length() {
34-
assert!(!is_anagram(String::from("Hello"), String::from("helllllo")))
36+
assert!(!is_anagram(String::from("Hello"), String::from("helllllo")));
3537
}
3638
}

0 commit comments

Comments
 (0)