Tweak error messages
authorAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 3 May 2018 11:05:21 +0000 (14:05 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 3 May 2018 15:31:23 +0000 (18:31 +0300)
By convention, all errors should start with a lowercase letter

src/cargo/util/config.rs
tests/testsuite/bad_config.rs
tests/testsuite/build.rs
tests/testsuite/cargo_alias_config.rs

index 263de41beeb37c6980d518943bba4ab7474c4033..91cf39cc7a8ce92393bd898eb4064a9de5c29449 100644 (file)
@@ -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 {
index 574d84bff1be97b66d17a7cde8269e13c644a05a..1bdf2f3078a08e0f5794826b7e70a246ae2b367f 100644 (file)
@@ -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 `[..]`
index 12cdd8ae76613da9ef7b5007ae8475cd0598f8c2..bba6fd2639fc9fc6c440c18e886f3050c7e89e43 100644 (file)
@@ -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 `[..]`
index 3eb1a0bf6126adb5e3df38fabc1a3b08f48f9cc0..adeb12787e5b05f889199147294fa8593d29ceef 100644 (file)
@@ -84,8 +84,7 @@ fn alias_config() {
                 "\
 [COMPILING] foo v0.5.0 [..]
 [RUNNING] `rustc --crate-name foo [..]",
-            )
-            .stream(),
+            ),
     );
 }