mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-14 01:32:24 +00:00
Make anyhow a dev dependency in uv-configuration (#3814)
This commit is contained in:
parent
e8e826949d
commit
dd27f2f710
2 changed files with 5 additions and 3 deletions
|
|
@ -19,7 +19,6 @@ platform-tags = { workspace = true }
|
||||||
uv-auth = { workspace = true }
|
uv-auth = { workspace = true }
|
||||||
uv-normalize = { workspace = true }
|
uv-normalize = { workspace = true }
|
||||||
|
|
||||||
anyhow = { workspace = true }
|
|
||||||
clap = { workspace = true, features = ["derive"], optional = true }
|
clap = { workspace = true, features = ["derive"], optional = true }
|
||||||
itertools = { workspace = true }
|
itertools = { workspace = true }
|
||||||
rustc-hash = { workspace = true }
|
rustc-hash = { workspace = true }
|
||||||
|
|
@ -28,5 +27,8 @@ serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
anyhow = { workspace = true }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,11 @@ pub struct ConfigSettingEntry {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FromStr for ConfigSettingEntry {
|
impl FromStr for ConfigSettingEntry {
|
||||||
type Err = anyhow::Error;
|
type Err = String;
|
||||||
|
|
||||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
let Some((key, value)) = s.split_once('=') else {
|
let Some((key, value)) = s.split_once('=') else {
|
||||||
return Err(anyhow::anyhow!(
|
return Err(format!(
|
||||||
"Invalid config setting: {s} (expected `KEY=VALUE`)"
|
"Invalid config setting: {s} (expected `KEY=VALUE`)"
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue