Correct formatting with cargo fmt
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Wed, 11 Apr 2018 21:16:17 +0000 (23:16 +0200)
committerDirkjan Ochtman <dirkjan@ochtman.nl>
Wed, 11 Apr 2018 21:16:17 +0000 (23:16 +0200)
src/cargo/core/resolver/context.rs
src/cargo/ops/resolve.rs
tests/testsuite/install.rs
tests/testsuite/required_features.rs

index 2c2281d61071e7c212dacf06f312b2d01acca005..c423cf3e815193689d563b8f9c321c56e948f601 100644 (file)
@@ -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));
index 68965388112443ed5d476c17a041c16d29538c3a..6d4e6d2dbf5c744a8eed8f4b28d1bc58da69d6ec 100644 (file)
@@ -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);
             }
         }
index f6d9bf10303ec0fc74786f35dc75bcbfe053404e..738b16f6a4b6c89864ddf7a1a3611c9d9a625a40 100644 (file)
@@ -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")));
 }
index 4e59c796bb68a6a6aaf537e3d683062c476f6637..6dba1ad70ca5e635f62302bca8c6a29cd2c75d35 100644 (file)
@@ -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));