Avoid duplicate imports

This commit is contained in:
Paul Dicker 2024-03-11 11:24:15 +01:00 committed by Paul Dicker
parent 1aabe844ed
commit 248683338d
5 changed files with 4 additions and 7 deletions

View File

@ -3,7 +3,7 @@
//! ISO 8601 date and time with time zone.
#[cfg(all(not(feature = "std"), feature = "alloc"))]
#[cfg(all(feature = "alloc", not(feature = "std"), not(test)))]
use alloc::string::String;
use core::borrow::Borrow;
use core::cmp::Ordering;

View File

@ -3,7 +3,7 @@
//! Date and time formatting routines.
#[cfg(all(not(feature = "std"), feature = "alloc"))]
#[cfg(all(feature = "alloc", not(feature = "std"), not(test)))]
use alloc::string::{String, ToString};
#[cfg(feature = "alloc")]
use core::borrow::Borrow;
@ -20,8 +20,6 @@ use crate::{NaiveDate, NaiveTime, Weekday};
#[cfg(feature = "alloc")]
use super::locales;
#[cfg(all(feature = "unstable-locales", feature = "alloc"))]
use super::Locale;
#[cfg(any(feature = "alloc", feature = "serde", feature = "rustc-serialize"))]
use super::{Colons, OffsetFormat, OffsetPrecision, Pad};
#[cfg(feature = "alloc")]

View File

@ -30,7 +30,7 @@
//! # Ok::<(), chrono::ParseError>(())
//! ```
#[cfg(all(not(feature = "std"), feature = "alloc"))]
#[cfg(all(feature = "alloc", not(feature = "std"), not(test)))]
use alloc::boxed::Box;
use core::fmt;
use core::str::FromStr;

View File

@ -165,7 +165,7 @@ use super::{locales, Locale};
use super::{Fixed, InternalInternal, Item, Numeric, Pad};
#[cfg(any(feature = "alloc", feature = "std"))]
use super::{ParseError, BAD_FORMAT};
#[cfg(feature = "alloc")]
#[cfg(all(feature = "alloc", not(feature = "std"), not(test)))]
use alloc::vec::Vec;
/// Parsing iterator for `strftime`-like format strings.

View File

@ -6,7 +6,6 @@
use crate::{DateTime, NaiveDateTime, TimeDelta, TimeZone, Timelike};
use core::cmp::Ordering;
use core::fmt;
use core::marker::Sized;
use core::ops::{Add, Sub};
/// Extension trait for subsecond rounding or truncation to a maximum number