Skip to content

Commit

Permalink
style: Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Oct 7, 2021
1 parent 6c7a9a9 commit 3e72cd2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/tree/examples/failures.rs
Expand Up @@ -12,7 +12,7 @@ fn main() {

let expected = [1, 2, 3];
let actual = 15;
let pred = predicates::iter::in_iter(expected);
let pred = predicates::iter::in_iter(IntoIterator::into_iter(expected));
if let Some(case) = pred.find_case(false, &actual) {
let tree = case.tree();
println!("{}", tree);
Expand Down Expand Up @@ -41,7 +41,7 @@ Moon!
Goodbye!";
let pred = predicates::str::diff(expected);
if let Some(case) = pred.find_case(false, &actual) {
if let Some(case) = pred.find_case(false, actual) {
let tree = case.tree();
println!("{}", tree);
}
Expand Down
4 changes: 2 additions & 2 deletions src/function.rs
Expand Up @@ -137,6 +137,6 @@ where
#[test]
fn str_function() {
let f = function(|x: &str| x == "hello");
assert!(f.eval(&"hello"));
assert!(!f.eval(&"goodbye"));
assert!(f.eval("hello"));
assert!(!f.eval("goodbye"));
}
1 change: 1 addition & 0 deletions src/path/fc.rs
Expand Up @@ -106,6 +106,7 @@ where
/// assert_eq!(true, predicate_fn.eval(Path::new("./tests/hello_world")));
/// assert_eq!(false, predicate_fn.eval(Path::new("./tests/empty_file")));
/// ```
#[allow(clippy::wrong_self_convention)]
fn from_file_path(self) -> FileContentPredicate<Self> {
FileContentPredicate { p: self }
}
Expand Down
1 change: 1 addition & 0 deletions src/str/adapters.rs
Expand Up @@ -175,6 +175,7 @@ where
/// let variable: &[u8] = b"";
/// assert_eq!(false, predicate_fn.eval(variable));
/// ```
#[allow(clippy::wrong_self_convention)]
fn from_utf8(self) -> Utf8Predicate<Self> {
Utf8Predicate { p: self }
}
Expand Down

0 comments on commit 3e72cd2

Please sign in to comment.