Skip to content

Commit 4cd544c

Browse files
committed
Fix error message when Cargo.toml misses a [package] section, remove an unused import
1 parent f0b06ca commit 4cd544c

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

src/cargo/util/toml/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ impl TomlManifest {
513513

514514
let project = me.project.as_ref().or_else(|| me.package.as_ref());
515515
let project = project.ok_or_else(|| {
516-
CargoError::from("no `package` or `project` section found.")
516+
CargoError::from("no `package` section found.")
517517
})?;
518518

519519
let package_name = project.name.trim();

tests/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn cargo_compile_with_invalid_manifest() {
9292
[ERROR] failed to parse manifest at `[..]`
9393
9494
Caused by:
95-
no `package` or `project` section found.
95+
no `package` section found.
9696
"))
9797
}
9898

tests/jobserver.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
extern crate cargotest;
22
extern crate hamcrest;
33

4-
use std::str;
54
use std::net::TcpListener;
65
use std::thread;
76
use std::process::Command;

tests/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ fn cargo_metadata_with_invalid_manifest() {
547547
[ERROR] failed to parse manifest at `[..]`
548548
549549
Caused by:
550-
no `package` or `project` section found."))
550+
no `package` section found."))
551551
}
552552

553553
const MANIFEST_OUTPUT: &'static str=

0 commit comments

Comments
 (0)