mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Correct formatting with cargo fmt
This commit is contained in:
parent
aafcf98a15
commit
5c241e1027
@ -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));
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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")));
|
||||
}
|
||||
|
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user