From dd27f2f710370d5d6fd548469fd8cb5609c93aa7 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 23 May 2024 22:49:31 -0400 Subject: [PATCH] Make anyhow a dev dependency in `uv-configuration` (#3814) --- crates/uv-configuration/Cargo.toml | 4 +++- crates/uv-configuration/src/config_settings.rs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/uv-configuration/Cargo.toml b/crates/uv-configuration/Cargo.toml index 27fff951d32f..34f05896d2a9 100644 --- a/crates/uv-configuration/Cargo.toml +++ b/crates/uv-configuration/Cargo.toml @@ -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 = [] diff --git a/crates/uv-configuration/src/config_settings.rs b/crates/uv-configuration/src/config_settings.rs index 530224c7a9cf..d69bb19c71e1 100644 --- a/crates/uv-configuration/src/config_settings.rs +++ b/crates/uv-configuration/src/config_settings.rs @@ -12,11 +12,11 @@ pub struct ConfigSettingEntry { } impl FromStr for ConfigSettingEntry { - type Err = anyhow::Error; + type Err = String; fn from_str(s: &str) -> Result { let Some((key, value)) = s.split_once('=') else { - return Err(anyhow::anyhow!( + return Err(format!( "Invalid config setting: {s} (expected `KEY=VALUE`)" )); };