Skip to content

Commit eb12fff

Browse files
committed
Auto merge of #7526 - ehuss:rustfmt, r=alexcrichton
rustfmt for nightly changes. Something in the latest nightly versions of rustfmt has slightly changed the logic here. Fortunately stable ignores the new formatting, and it looks better to me anyways. I tend to always use nightly, so this helps me with a slight annoyance where this line keeps getting changed.
2 parents 06ddf35 + d6d1514 commit eb12fff

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

src/cargo/core/package_id.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,10 @@ mod tests {
226226
fn debug() {
227227
let loc = CRATES_IO_INDEX.into_url().unwrap();
228228
let pkg_id = PackageId::new("foo", "1.0.0", SourceId::for_registry(&loc).unwrap()).unwrap();
229-
assert_eq!(r#"PackageId { name: "foo", version: "1.0.0", source: "registry `https://github.com/rust-lang/crates.io-index`" }"#, format!("{:?}", pkg_id));
229+
assert_eq!(
230+
r#"PackageId { name: "foo", version: "1.0.0", source: "registry `https://github.com/rust-lang/crates.io-index`" }"#,
231+
format!("{:?}", pkg_id)
232+
);
230233

231234
let expected = r#"
232235
PackageId {

tests/testsuite/install.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,12 +1131,20 @@ and will continue to do so, but this behavior will be removed eventually
11311131

11321132
#[cargo_test]
11331133
fn test_install_git_cannot_be_a_base_url() {
1134-
cargo_process("install --git github.com:rust-lang-nursery/rustfmt.git").with_status(101).with_stderr("error: invalid url `github.com:rust-lang-nursery/rustfmt.git`: cannot-be-a-base-URLs are not supported").run();
1134+
cargo_process("install --git github.com:rust-lang-nursery/rustfmt.git")
1135+
.with_status(101)
1136+
.with_stderr("\
1137+
[ERROR] invalid url `github.com:rust-lang-nursery/rustfmt.git`: cannot-be-a-base-URLs are not supported")
1138+
.run();
11351139
}
11361140

11371141
#[cargo_test]
11381142
fn uninstall_multiple_and_specifying_bin() {
1139-
cargo_process("uninstall foo bar --bin baz").with_status(101).with_stderr("error: A binary can only be associated with a single installed package, specifying multiple specs with --bin is redundant.").run();
1143+
cargo_process("uninstall foo bar --bin baz")
1144+
.with_status(101)
1145+
.with_stderr("\
1146+
[ERROR] A binary can only be associated with a single installed package, specifying multiple specs with --bin is redundant.")
1147+
.run();
11401148
}
11411149

11421150
#[cargo_test]

0 commit comments

Comments
 (0)