From f5d8ae423aa195d3423029ff5a618266cc8ff9a5 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 19 Feb 2024 16:10:06 -0800 Subject: [PATCH] Resolve prelude redundant import warnings warning: the item `Into` is imported redundantly --> serde/src/lib.rs:184:47 | 184 | pub use self::core::convert::{self, From, Into}; | ^^^^ | ::: nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/prelude/mod.rs:115:13 | 115 | pub use super::v1::*; | --------- the item `Into` is already defined here | = note: `#[warn(unused_imports)]` on by default --- serde/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/serde/src/lib.rs b/serde/src/lib.rs index 6d66d8e1c..307e8c7b7 100644 --- a/serde/src/lib.rs +++ b/serde/src/lib.rs @@ -179,16 +179,16 @@ mod lib { pub use self::core::{cmp, mem, slice}; pub use self::core::cell::{Cell, RefCell}; - pub use self::core::clone::{self, Clone}; + pub use self::core::clone; pub use self::core::cmp::Reverse; - pub use self::core::convert::{self, From, Into}; - pub use self::core::default::{self, Default}; + pub use self::core::convert; + pub use self::core::default; pub use self::core::fmt::{self, Debug, Display, Write as FmtWrite}; pub use self::core::marker::{self, PhantomData}; pub use self::core::num::Wrapping; pub use self::core::ops::{Bound, Range, RangeFrom, RangeInclusive, RangeTo}; - pub use self::core::option::{self, Option}; - pub use self::core::result::{self, Result}; + pub use self::core::option; + pub use self::core::result; pub use self::core::time::Duration; #[cfg(all(feature = "alloc", not(feature = "std")))]