Fix error message when Cargo.toml misses a [package] section, remove an unused import
authorMatthias Devlamynck <matthias.devlamynck@mailoo.org>
Wed, 4 Oct 2017 19:24:26 +0000 (21:24 +0200)
committerMatthias Devlamynck <matthias.devlamynck@mailoo.org>
Wed, 4 Oct 2017 19:24:26 +0000 (21:24 +0200)
src/cargo/util/toml/mod.rs
tests/build.rs
tests/jobserver.rs
tests/metadata.rs

index c2220ac2d6e7254c219739276b9d474769d8cb3f..e9e7fe8aeee2e9e93907e6045c4a8b76f9abdd57 100644 (file)
@@ -513,7 +513,7 @@ impl TomlManifest {
 
         let project = me.project.as_ref().or_else(|| me.package.as_ref());
         let project = project.ok_or_else(|| {
-            CargoError::from("no `package` or `project` section found.")
+            CargoError::from("no `package` section found.")
         })?;
 
         let package_name = project.name.trim();
index 3bc34ca3a2b0299a47a8ec59b0c1a717e009e940..f8fc6e912c0c31ff67585e2f8cfbdca143f67b58 100644 (file)
@@ -92,7 +92,7 @@ fn cargo_compile_with_invalid_manifest() {
 [ERROR] failed to parse manifest at `[..]`
 
 Caused by:
-  no `package` or `project` section found.
+  no `package` section found.
 "))
 }
 
index 7356c73b0a2b753034f786035b9ff289e69b2bd4..2e7e8b81624a92b9807b7111fd2c5e7d49518c47 100644 (file)
@@ -1,7 +1,6 @@
 extern crate cargotest;
 extern crate hamcrest;
 
-use std::str;
 use std::net::TcpListener;
 use std::thread;
 use std::process::Command;
index 25a0edf01e596adc6ccc0f2dcc6948b70a276437..6293e16480542ea5b7d70b7eda3e3987fd70c474 100644 (file)
@@ -547,7 +547,7 @@ fn cargo_metadata_with_invalid_manifest() {
 [ERROR] failed to parse manifest at `[..]`
 
 Caused by:
-  no `package` or `project` section found."))
+  no `package` section found."))
 }
 
 const MANIFEST_OUTPUT: &'static str=