From: Dirkjan Ochtman Date: Wed, 11 Apr 2018 21:16:17 +0000 (+0200) Subject: Correct formatting with cargo fmt X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~1^2~78^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5c241e102756e340991365d7b376997a9ae95f62;p=cargo.git Correct formatting with cargo fmt --- diff --git a/src/cargo/core/resolver/context.rs b/src/cargo/core/resolver/context.rs index 2c2281d61..c423cf3e8 100644 --- a/src/cargo/core/resolver/context.rs +++ b/src/cargo/core/resolver/context.rs @@ -244,9 +244,11 @@ impl Context { if !reqs.used.is_empty() { let pkgid = s.package_id(); - let set = Rc::make_mut(self.resolve_features - .entry(pkgid.clone()) - .or_insert_with(|| Rc::new(HashSet::new()))); + let set = Rc::make_mut( + self.resolve_features + .entry(pkgid.clone()) + .or_insert_with(|| Rc::new(HashSet::new())), + ); for feature in reqs.used { set.insert(InternedString::new(feature)); diff --git a/src/cargo/ops/resolve.rs b/src/cargo/ops/resolve.rs index 689653881..6d4e6d2db 100644 --- a/src/cargo/ops/resolve.rs +++ b/src/cargo/ops/resolve.rs @@ -479,11 +479,16 @@ fn register_previous_locks<'a>( // Ok if nothing matches, then we poison the source of this // dependencies and the previous lock file. - debug!("poisoning {} because {} looks like it changed {}", - dep.source_id(), - member.package_id(), - dep.name()); - for id in resolve.iter().filter(|id| id.source_id() == dep.source_id()) { + debug!( + "poisoning {} because {} looks like it changed {}", + dep.source_id(), + member.package_id(), + dep.name() + ); + for id in resolve + .iter() + .filter(|id| id.source_id() == dep.source_id()) + { add_deps(resolve, id, &mut avoid_locking); } } diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index f6d9bf103..738b16f6a 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -1042,13 +1042,16 @@ fn installs_from_cwd_with_2018_warnings() { .build(); assert_that( - cargo_process("install").cwd(p.root()).masquerade_as_nightly_cargo(), + cargo_process("install") + .cwd(p.root()) + .masquerade_as_nightly_cargo(), execs().with_status(101).with_stderr_contains( "error: To build the current package use `cargo build`, \ to install the current package run `cargo install --path .`, \ otherwise specify a crate to install from crates.io, \ or use --path or --git to specify alternate source\ - "), + ", + ), ); assert_that(cargo_home(), is_not(has_installed_exe("foo"))); } diff --git a/tests/testsuite/required_features.rs b/tests/testsuite/required_features.rs index 4e59c796b..6dba1ad70 100644 --- a/tests/testsuite/required_features.rs +++ b/tests/testsuite/required_features.rs @@ -758,7 +758,10 @@ fn install_default_features() { ); assert_that(cargo_home(), is_not(has_installed_exe("foo"))); - assert_that(p.cargo("install --path .").arg("--bin=foo"), execs().with_status(0)); + assert_that( + p.cargo("install --path .").arg("--bin=foo"), + execs().with_status(0), + ); assert_that(cargo_home(), has_installed_exe("foo")); assert_that(p.cargo("uninstall").arg("foo"), execs().with_status(0));