Skip to content

Commit dc449bc

Browse files
committed
cargo clippy + fmt
1 parent a668956 commit dc449bc

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/cargo/ops/common_for_install_and_uninstall.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ where
631631

632632
fn multi_err<T>(kind: &str, source: &T, mut pkgs: Vec<&Package>) -> String
633633
where
634-
T: Source
634+
T: Source,
635635
{
636636
pkgs.sort_unstable_by_key(|a| a.name());
637637
let first_pkg = pkgs.iter().nth(0).unwrap();

tests/testsuite/install.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::fs::{self, OpenOptions};
44
use std::io::prelude::*;
55
use std::path::Path;
66

7-
use cargo_test_support::{compare};
7+
use cargo_test_support::compare;
88
use cargo_test_support::cross_compile;
99
use cargo_test_support::git;
1010
use cargo_test_support::registry::{self, registry_path, Package};
@@ -572,14 +572,14 @@ fn multiple_binaries_error() {
572572
cargo_process("install --git")
573573
.arg(p.url().to_string())
574574
.with_status(101)
575-
.with_stderr(
576-
format!("\
575+
.with_stderr(format!(
576+
"\
577577
[UPDATING] git repository [..]
578578
[ERROR] multiple packages with binaries found: bar, foo. \
579579
When installing a git repository, cargo will always search the entire repo for any Cargo.toml.\n\
580580
Please specify a package, e.g. `cargo install --git {git_url} bar`.
581-
"),
582-
)
581+
"
582+
))
583583
.run();
584584
}
585585

@@ -591,18 +591,20 @@ fn multiple_examples_error() {
591591
.file("examples/ex1.rs", "fn main() {}")
592592
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
593593
.file("bar/src/lib.rs", "")
594-
.file("bar/examples/ex1.rs", "fn main() {}",)
594+
.file("bar/examples/ex1.rs", "fn main() {}")
595595
.build();
596-
596+
597597
let git_url = p.url().to_string();
598598
cargo_process("install --example ex1 --git")
599599
.arg(p.url().to_string())
600600
.with_status(101)
601-
.with_stderr(format!("\
601+
.with_stderr(format!(
602+
"\
602603
[UPDATING] git repository [..]
603604
[ERROR] multiple packages with examples found: bar, foo. \
604605
When installing a git repository, cargo will always search the entire repo for any Cargo.toml.\n\
605-
Please specify a package, e.g. `cargo install --git {git_url} bar`."))
606+
Please specify a package, e.g. `cargo install --git {git_url} bar`."
607+
))
606608
.run();
607609
}
608610

@@ -768,7 +770,6 @@ fn multiple_crates_auto_examples() {
768770
assert_has_installed_exe(cargo_home(), "foo");
769771
}
770772

771-
772773
#[cargo_test]
773774
fn no_binaries_or_examples() {
774775
let p = project()

0 commit comments

Comments
 (0)