From: Aleksey Kladov Date: Thu, 3 May 2018 11:05:21 +0000 (+0300) Subject: Tweak error messages X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~1^2~21^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ecd1e5df0f9b84d95eeb013305dc43bdbd7e9bac;p=cargo.git Tweak error messages By convention, all errors should start with a lowercase letter --- diff --git a/src/cargo/util/config.rs b/src/cargo/util/config.rs index 263de41be..91cf39cc7 100644 --- a/src/cargo/util/config.rs +++ b/src/cargo/util/config.rs @@ -557,7 +557,7 @@ impl Config { cfg.merge(value) .chain_err(|| format!("failed to merge configuration at `{}`", path.display()))?; Ok(()) - }).chain_err(|| "Couldn't load Cargo configuration")?; + }).chain_err(|| "could not load Cargo configuration")?; self.load_credentials(&mut cfg)?; match cfg { diff --git a/tests/testsuite/bad_config.rs b/tests/testsuite/bad_config.rs index 574d84bff..1bdf2f307 100644 --- a/tests/testsuite/bad_config.rs +++ b/tests/testsuite/bad_config.rs @@ -61,7 +61,7 @@ fn bad2() { p.cargo("publish").arg("-v"), execs().with_status(101).with_stderr( "\ -[ERROR] Couldn't load Cargo configuration +[ERROR] could not load Cargo configuration Caused by: failed to load TOML configuration from `[..]config` @@ -164,10 +164,7 @@ fn bad5() { .cwd(&p.root().join("foo")), execs().with_status(101).with_stderr( "\ -[ERROR] Failed to create project `foo` at `[..]` - -Caused by: - Couldn't load Cargo configuration +[ERROR] could not load Cargo configuration Caused by: failed to merge configuration at `[..]` @@ -284,7 +281,7 @@ fn invalid_global_config() { p.cargo("build").arg("-v"), execs().with_status(101).with_stderr( "\ -[ERROR] Couldn't load Cargo configuration +[ERROR] could not load Cargo configuration Caused by: could not parse TOML configuration in `[..]` diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index 12cdd8ae7..bba6fd263 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -2913,7 +2913,7 @@ fn bad_cargo_config() { foo.cargo("build").arg("-v"), execs().with_status(101).with_stderr( "\ -[ERROR] Couldn't load Cargo configuration +[ERROR] could not load Cargo configuration Caused by: could not parse TOML configuration in `[..]` diff --git a/tests/testsuite/cargo_alias_config.rs b/tests/testsuite/cargo_alias_config.rs index 3eb1a0bf6..adeb12787 100644 --- a/tests/testsuite/cargo_alias_config.rs +++ b/tests/testsuite/cargo_alias_config.rs @@ -84,8 +84,7 @@ fn alias_config() { "\ [COMPILING] foo v0.5.0 [..] [RUNNING] `rustc --crate-name foo [..]", - ) - .stream(), + ), ); }