profiles: improve formatting of some new error messages

This commit is contained in:
Dan Aloni 2019-09-12 17:03:48 +03:00
parent c86213f141
commit d71a172eae

View File

@ -214,13 +214,13 @@ impl Profiles {
Some(name) => { Some(name) => {
let name = name.to_owned(); let name = name.to_owned();
if set.get(&name).is_some() { if set.get(&name).is_some() {
failure::bail!("Inheritance loop of profiles cycles with {}", name); failure::bail!("Inheritance loop of profiles cycles with profile '{}'", name);
} }
set.insert(name.clone()); set.insert(name.clone());
match profiles.get(&name) { match profiles.get(&name) {
None => { None => {
failure::bail!("Profile {} not found in Cargo.toml", name); failure::bail!("Profile '{}' not found in Cargo.toml", name);
} }
Some(parent) => self.process_chain(&name, parent, set, result, profiles), Some(parent) => self.process_chain(&name, parent, set, result, profiles),
} }
@ -228,8 +228,8 @@ impl Profiles {
None => { None => {
failure::bail!( failure::bail!(
"An 'inherits' directive is needed for all \ "An 'inherits' directive is needed for all \
profiles that are not 'dev' or 'release. Here \ profiles that are not 'dev' or 'release'. Here \
it is missing from {}", it is missing from '{}'",
name name
); );
} }