diff --git a/crates/uv-bin-install/src/lib.rs b/crates/uv-bin-install/src/lib.rs index b73feb079..535ae4fcd 100644 --- a/crates/uv-bin-install/src/lib.rs +++ b/crates/uv-bin-install/src/lib.rs @@ -141,7 +141,7 @@ pub enum Error { #[error("Request failed after {retries} {subject}", subject = if *retries > 1 { "retries" } else { "retry" })] RetriedError { #[source] - err: Box, + err: Box, retries: u32, }, } diff --git a/crates/uv-build-frontend/src/error.rs b/crates/uv-build-frontend/src/error.rs index 299ce3e00..be6b1ab27 100644 --- a/crates/uv-build-frontend/src/error.rs +++ b/crates/uv-build-frontend/src/error.rs @@ -9,7 +9,6 @@ use crate::PythonRunnerOutput; use owo_colors::OwoColorize; use regex::Regex; use thiserror::Error; -use tracing::error; use uv_configuration::BuildOutput; use uv_distribution_types::IsBuildBackendError; use uv_fs::Simplified; diff --git a/crates/uv-cache-info/src/glob.rs b/crates/uv-cache-info/src/glob.rs index e9c85897f..35cf51607 100644 --- a/crates/uv-cache-info/src/glob.rs +++ b/crates/uv-cache-info/src/glob.rs @@ -65,7 +65,7 @@ fn split_glob(pattern: impl AsRef) -> GlobParts { /// Classic trie with edges being path components and values being glob patterns. #[derive(Default)] struct Trie<'a> { - children: BTreeMap, Trie<'a>>, + children: BTreeMap, Self>, patterns: Vec<&'a Path>, } diff --git a/crates/uv-client/src/error.rs b/crates/uv-client/src/error.rs index d28e02030..d82773386 100644 --- a/crates/uv-client/src/error.rs +++ b/crates/uv-client/src/error.rs @@ -302,10 +302,7 @@ pub enum ErrorKind { /// Add the number of failed retries to the error. #[error("Request failed after {retries} {subject}", subject = if *retries > 1 { "retries" } else { "retry" })] - RequestWithRetries { - source: Box, - retries: u32, - }, + RequestWithRetries { source: Box, retries: u32 }, #[error("Received some unexpected JSON from {}", url)] BadJson { diff --git a/crates/uv-python/src/downloads.rs b/crates/uv-python/src/downloads.rs index be031d984..a7230fa5e 100644 --- a/crates/uv-python/src/downloads.rs +++ b/crates/uv-python/src/downloads.rs @@ -57,7 +57,7 @@ pub enum Error { #[error("Request failed after {retries} {subject}", subject = if *retries > 1 { "retries" } else { "retry" })] NetworkErrorWithRetries { #[source] - err: Box, + err: Box, retries: u32, }, #[error("Failed to download {0}")] @@ -105,7 +105,7 @@ pub enum Error { #[error("This version of uv is too old to support the JSON Python download list at {0}")] UnsupportedPythonDownloadsJSON(String), #[error("Error while fetching remote python downloads json from '{0}'")] - FetchingPythonDownloadsJSONError(String, #[source] Box), + FetchingPythonDownloadsJSONError(String, #[source] Box), #[error("An offline Python installation was requested, but {file} (from {url}) is missing in {}", python_builds_dir.user_display())] OfflinePythonMissing { file: Box, @@ -776,8 +776,7 @@ impl FromStr for PythonDownloadRequest { let mut state = State::new(parts.by_ref()); state.next_part(); - loop { - let Some(part) = state.part else { break }; + while let Some(part) = state.part { match state.position { Position::Start => unreachable!("We start before the loop"), Position::Implementation => { diff --git a/crates/uv-resolver/src/error.rs b/crates/uv-resolver/src/error.rs index 8a348eafb..e087790e5 100644 --- a/crates/uv-resolver/src/error.rs +++ b/crates/uv-resolver/src/error.rs @@ -38,12 +38,7 @@ use crate::{InMemoryIndex, Options}; #[derive(Debug, thiserror::Error)] pub enum ResolveError { #[error("Failed to resolve dependencies for package `{1}=={2}`")] - Dependencies( - #[source] Box, - PackageName, - Version, - DerivationChain, - ), + Dependencies(#[source] Box, PackageName, Version, DerivationChain), #[error(transparent)] Client(#[from] uv_client::Error), diff --git a/crates/uv-workspace/src/dependency_groups.rs b/crates/uv-workspace/src/dependency_groups.rs index b71921273..fec317280 100644 --- a/crates/uv-workspace/src/dependency_groups.rs +++ b/crates/uv-workspace/src/dependency_groups.rs @@ -3,7 +3,6 @@ use std::str::FromStr; use std::{collections::BTreeMap, path::Path}; use thiserror::Error; -use tracing::error; use uv_distribution_types::RequiresPython; use uv_fs::Simplified;