diff --git a/.travis.yml b/.travis.yml index 753fcb2..4bf4bd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,10 +18,10 @@ matrix: install: script: - cargo check --tests --all-features - - env: CLIPPY_VERSION="0.0.209" - rust: nightly-2018-06-19 + - env: CLIPPY + rust: nightly-2018-07-17 install: - - travis_wait cargo install clippy --version $CLIPPY_VERSION || echo "clippy already installed" + - rustup component add clippy-preview script: - cargo clippy --all-features -- -D clippy diff --git a/src/cargo.rs b/src/cargo.rs index a1d25cb..b83f588 100644 --- a/src/cargo.rs +++ b/src/cargo.rs @@ -131,7 +131,7 @@ pub fn main_binary_path() -> Result { let cargo = escargot::Cargo::new().build().current_release(); let bins: Vec<_> = cargo .exec() - .map_err(|e| CargoError::with_cause(e))? + .map_err(CargoError::with_cause)? .filter_map(|m| extract_filenames(&m, "bin")) .collect(); if bins.is_empty() { @@ -150,7 +150,7 @@ pub fn cargo_bin_path>(name: S) -> Result = cargo .exec() - .map_err(|e| CargoError::with_cause(e))? + .map_err(CargoError::with_cause)? .filter_map(|m| extract_filenames(&m, "bin")) .collect(); assert_eq!(bins.len(), 1); @@ -165,7 +165,7 @@ pub fn cargo_example_path>(name: S) -> Result = cargo .exec() - .map_err(|e| CargoError::with_cause(e))? + .map_err(CargoError::with_cause)? .filter_map(|m| extract_filenames(&m, "example")) .collect(); assert_eq!(bins.len(), 1); diff --git a/src/errors.rs b/src/errors.rs index 180514e..46dbb4e 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -106,7 +106,7 @@ impl Error for OutputError { } fn cause(&self) -> Option<&Error> { - if let &OutputCause::Unexpected(ref err) = &self.cause { + if let OutputCause::Unexpected(ref err) = self.cause { Some(err.as_ref()) } else { None