From 384c311692e6ff537b51bcf57f804b917a702c9c Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 18 Oct 2019 14:20:01 -0700 Subject: [PATCH 1/2] rustfmt for nightly changes. --- src/cargo/core/package_id.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cargo/core/package_id.rs b/src/cargo/core/package_id.rs index 8c40e9dd9d6..e15fbed243b 100644 --- a/src/cargo/core/package_id.rs +++ b/src/cargo/core/package_id.rs @@ -226,7 +226,10 @@ mod tests { fn debug() { let loc = CRATES_IO_INDEX.into_url().unwrap(); let pkg_id = PackageId::new("foo", "1.0.0", SourceId::for_registry(&loc).unwrap()).unwrap(); - assert_eq!(r#"PackageId { name: "foo", version: "1.0.0", source: "registry `https://github.com/rust-lang/crates.io-index`" }"#, format!("{:?}", pkg_id)); + assert_eq!( + r#"PackageId { name: "foo", version: "1.0.0", source: "registry `https://github.com/rust-lang/crates.io-index`" }"#, + format!("{:?}", pkg_id) + ); let expected = r#" PackageId { From d6d15141f8ef21f1cebeaa4d42606f29e7d00239 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 18 Oct 2019 15:17:59 -0700 Subject: [PATCH 2/2] Wrap some really long lines. These do not wrap due to https://github.com/rust-lang/rustfmt/issues/3863. --- tests/testsuite/install.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index 2ebfb8ebfac..84641fd5db6 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -1131,12 +1131,20 @@ and will continue to do so, but this behavior will be removed eventually #[cargo_test] fn test_install_git_cannot_be_a_base_url() { - 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(); + 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(); } #[cargo_test] fn uninstall_multiple_and_specifying_bin() { - 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(); + 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(); } #[cargo_test]