Improve two error messages

This commit is contained in:
r00ster91 2021-05-10 17:28:19 +02:00
parent e51522ab3d
commit b381fdb71e
2 changed files with 4 additions and 4 deletions

View File

@ -395,7 +395,7 @@ impl<'de> de::Deserialize<'de> for TomlOptLevel {
Ok(TomlOptLevel(value.to_string()))
} else {
Err(E::custom(format!(
"must be an integer, `z`, or `s`, \
"must be `0`, `1`, `2`, `3`, `s` or `z`, \
but found the string: \"{}\"",
value
)))
@ -553,7 +553,7 @@ impl TomlProfile {
if let Some(panic) = &self.panic {
if panic != "unwind" && panic != "abort" {
bail!(
"`panic` setting of `{}` is not a valid setting,\
"`panic` setting of `{}` is not a valid setting, \
must be `unwind` or `abort`",
panic
);

View File

@ -583,7 +583,7 @@ opt-level = 'foo'
error in [..]/.cargo/config: could not load config key `profile.dev.opt-level`
Caused by:
must be an integer, `z`, or `s`, but found the string: \"foo\"",
must be `0`, `1`, `2`, `3`, `s` or `z`, but found the string: \"foo\"",
);
let config = ConfigBuilder::new()
@ -596,7 +596,7 @@ Caused by:
error in environment variable `CARGO_PROFILE_DEV_OPT_LEVEL`: could not load config key `profile.dev.opt-level`
Caused by:
must be an integer, `z`, or `s`, but found the string: \"asdf\"",
must be `0`, `1`, `2`, `3`, `s` or `z`, but found the string: \"asdf\"",
);
}