Make anyhow a dev dependency in uv-configuration (#3814)

This commit is contained in:
Charlie Marsh 2024-05-23 22:49:31 -04:00 committed by GitHub
parent e8e826949d
commit dd27f2f710
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -19,7 +19,6 @@ platform-tags = { workspace = true }
uv-auth = { workspace = true }
uv-normalize = { workspace = true }
anyhow = { workspace = true }
clap = { workspace = true, features = ["derive"], optional = true }
itertools = { workspace = true }
rustc-hash = { workspace = true }
@ -28,5 +27,8 @@ serde = { workspace = true }
serde_json = { workspace = true }
tracing = { workspace = true }
[dev-dependencies]
anyhow = { workspace = true }
[features]
default = []

View file

@ -12,11 +12,11 @@ pub struct ConfigSettingEntry {
}
impl FromStr for ConfigSettingEntry {
type Err = anyhow::Error;
type Err = String;
fn from_str(s: &str) -> Result<Self, Self::Err> {
let Some((key, value)) = s.split_once('=') else {
return Err(anyhow::anyhow!(
return Err(format!(
"Invalid config setting: {s} (expected `KEY=VALUE`)"
));
};