Skip to content

Commit

Permalink
Make anyhow a dev dependency in uv-configuration (#3814)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh authored May 24, 2024
1 parent e8e8269 commit dd27f2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion crates/uv-configuration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -28,5 +27,8 @@ serde = { workspace = true }
serde_json = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
anyhow = { workspace = true }

[features]
default = []
4 changes: 2 additions & 2 deletions crates/uv-configuration/src/config_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`)"
));
};
Expand Down

0 comments on commit dd27f2f

Please sign in to comment.