mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Fix optional cfg gates (#14448)
Running `cargo clippy` in individual crates could raise warnings due to unused imports as `Cow` is only used with `#[cfg(feature = "schemars")]`
This commit is contained in:
parent
8afbd86f03
commit
06af93fce7
8 changed files with 20 additions and 7 deletions
|
@ -1,4 +1,6 @@
|
|||
use std::{borrow::Cow, str::FromStr};
|
||||
#[cfg(feature = "schemars")]
|
||||
use std::borrow::Cow;
|
||||
use std::str::FromStr;
|
||||
|
||||
use uv_pep508::PackageName;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
use std::str::FromStr;
|
||||
use std::{borrow::Cow, fmt::Formatter};
|
||||
#[cfg(feature = "schemars")]
|
||||
use std::borrow::Cow;
|
||||
use std::{fmt::Formatter, str::FromStr};
|
||||
|
||||
use uv_pep440::{Version, VersionSpecifier, VersionSpecifiers, VersionSpecifiersParseError};
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
use serde::{Deserialize, Deserializer};
|
||||
use std::{borrow::Cow, str::FromStr};
|
||||
#[cfg(feature = "schemars")]
|
||||
use std::borrow::Cow;
|
||||
use std::str::FromStr;
|
||||
use url::Url;
|
||||
|
||||
/// A host specification (wildcard, or host, with optional scheme and/or port) for which
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
//! flags set.
|
||||
|
||||
use serde::{Deserialize, Deserializer, Serialize};
|
||||
use std::{borrow::Cow, path::Path};
|
||||
#[cfg(feature = "schemars")]
|
||||
use std::borrow::Cow;
|
||||
use std::path::Path;
|
||||
|
||||
use crate::{Index, IndexUrl};
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
use std::{borrow::Cow, ops::Deref};
|
||||
#[cfg(feature = "schemars")]
|
||||
use std::borrow::Cow;
|
||||
use std::ops::Deref;
|
||||
|
||||
use http::StatusCode;
|
||||
use rustc_hash::FxHashSet;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#[cfg(feature = "schemars")]
|
||||
use std::borrow::Cow;
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::ops::Deref;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
use std::{borrow::Cow, str::FromStr};
|
||||
#[cfg(feature = "schemars")]
|
||||
use std::borrow::Cow;
|
||||
use std::str::FromStr;
|
||||
|
||||
use jiff::{Timestamp, ToSpan, tz::TimeZone};
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
//!
|
||||
//! Then lowers them into a dependency specification.
|
||||
|
||||
#[cfg(feature = "schemars")]
|
||||
use std::borrow::Cow;
|
||||
use std::collections::BTreeMap;
|
||||
use std::fmt::Formatter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue