We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 531f35e commit ed005c7Copy full SHA for ed005c7
Makefile
@@ -1,2 +1,5 @@
1
test:
2
@cargo test -p $(lib) --lib -- --nocapture
3
+
4
+lint:
5
+ cargo clippy --all-targets --all-features
crates/valid_anagram/src/lib.rs
@@ -1,5 +1,7 @@
use std::collections::HashMap;
+#[must_use]
+#[allow(clippy::needless_pass_by_value)]
pub fn is_anagram(s: String, t: String) -> bool {
6
if s.len() != t.len() {
7
return false;
@@ -31,6 +33,6 @@ mod tests {
31
33
32
34
#[test]
35
fn different_length() {
- assert!(!is_anagram(String::from("Hello"), String::from("helllllo")))
36
+ assert!(!is_anagram(String::from("Hello"), String::from("helllllo")));
37
}
38
0 commit comments