remove some unneeded imports
This commit is contained in:
parent
661b33f524
commit
ad2b34d0e3
55 changed files with 64 additions and 135 deletions
|
@ -1446,7 +1446,6 @@ impl<'a, K, V> IterMut<'a, K, V> {
|
|||
/// (provided by the [`IntoIterator`] trait). See its documentation for more.
|
||||
///
|
||||
/// [`into_iter`]: IntoIterator::into_iter
|
||||
/// [`IntoIterator`]: crate::iter::IntoIterator
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
|
|
|
@ -1272,7 +1272,6 @@ pub struct Iter<'a, K: 'a> {
|
|||
/// (provided by the [`IntoIterator`] trait). See its documentation for more.
|
||||
///
|
||||
/// [`into_iter`]: IntoIterator::into_iter
|
||||
/// [`IntoIterator`]: crate::iter::IntoIterator
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
|
|
@ -395,8 +395,6 @@
|
|||
//! // ...but the key hasn't changed. b is still "baz", not "xyz".
|
||||
//! assert_eq!(map.keys().next().unwrap().b, "baz");
|
||||
//! ```
|
||||
//!
|
||||
//! [IntoIterator]: crate::iter::IntoIterator "iter::IntoIterator"
|
||||
|
||||
#![stable(feature = "rust1", since = "1.0.0")]
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ use crate::cmp;
|
|||
use crate::collections::TryReserveError;
|
||||
use crate::fmt;
|
||||
use crate::hash::{Hash, Hasher};
|
||||
use crate::iter::Extend;
|
||||
use crate::ops;
|
||||
use crate::rc::Rc;
|
||||
use crate::str::FromStr;
|
||||
|
|
|
@ -11,7 +11,6 @@ mod repr_unpacked;
|
|||
#[cfg(not(target_pointer_width = "64"))]
|
||||
use repr_unpacked::Repr;
|
||||
|
||||
use crate::convert::From;
|
||||
use crate::error;
|
||||
use crate::fmt;
|
||||
use crate::result;
|
||||
|
|
|
@ -1678,7 +1678,7 @@ mod super_keyword {}
|
|||
/// below `Iterator` is a **supertrait** and `ThreeIterator` is a **subtrait**:
|
||||
///
|
||||
/// ```rust
|
||||
/// trait ThreeIterator: std::iter::Iterator {
|
||||
/// trait ThreeIterator: Iterator {
|
||||
/// fn next_three(&mut self) -> Option<[Self::Item; 3]>;
|
||||
/// }
|
||||
/// ```
|
||||
|
|
|
@ -78,7 +78,7 @@ use crate::fmt;
|
|||
use crate::fs;
|
||||
use crate::hash::{Hash, Hasher};
|
||||
use crate::io;
|
||||
use crate::iter::{self, FusedIterator};
|
||||
use crate::iter::FusedIterator;
|
||||
use crate::ops::{self, Deref};
|
||||
use crate::rc::Rc;
|
||||
use crate::str::FromStr;
|
||||
|
@ -450,26 +450,26 @@ impl<'a> PrefixComponent<'a> {
|
|||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<'a> cmp::PartialEq for PrefixComponent<'a> {
|
||||
impl<'a> PartialEq for PrefixComponent<'a> {
|
||||
#[inline]
|
||||
fn eq(&self, other: &PrefixComponent<'a>) -> bool {
|
||||
cmp::PartialEq::eq(&self.parsed, &other.parsed)
|
||||
self.parsed == other.parsed
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<'a> cmp::PartialOrd for PrefixComponent<'a> {
|
||||
impl<'a> PartialOrd for PrefixComponent<'a> {
|
||||
#[inline]
|
||||
fn partial_cmp(&self, other: &PrefixComponent<'a>) -> Option<cmp::Ordering> {
|
||||
cmp::PartialOrd::partial_cmp(&self.parsed, &other.parsed)
|
||||
PartialOrd::partial_cmp(&self.parsed, &other.parsed)
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl cmp::Ord for PrefixComponent<'_> {
|
||||
impl Ord for PrefixComponent<'_> {
|
||||
#[inline]
|
||||
fn cmp(&self, other: &Self) -> cmp::Ordering {
|
||||
cmp::Ord::cmp(&self.parsed, &other.parsed)
|
||||
Ord::cmp(&self.parsed, &other.parsed)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -988,7 +988,7 @@ impl<'a> DoubleEndedIterator for Components<'a> {
|
|||
impl FusedIterator for Components<'_> {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<'a> cmp::PartialEq for Components<'a> {
|
||||
impl<'a> PartialEq for Components<'a> {
|
||||
#[inline]
|
||||
fn eq(&self, other: &Components<'a>) -> bool {
|
||||
let Components { path: _, front: _, back: _, has_physical_root: _, prefix: _ } = self;
|
||||
|
@ -1015,10 +1015,10 @@ impl<'a> cmp::PartialEq for Components<'a> {
|
|||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl cmp::Eq for Components<'_> {}
|
||||
impl Eq for Components<'_> {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<'a> cmp::PartialOrd for Components<'a> {
|
||||
impl<'a> PartialOrd for Components<'a> {
|
||||
#[inline]
|
||||
fn partial_cmp(&self, other: &Components<'a>) -> Option<cmp::Ordering> {
|
||||
Some(compare_components(self.clone(), other.clone()))
|
||||
|
@ -1026,7 +1026,7 @@ impl<'a> cmp::PartialOrd for Components<'a> {
|
|||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl cmp::Ord for Components<'_> {
|
||||
impl Ord for Components<'_> {
|
||||
#[inline]
|
||||
fn cmp(&self, other: &Self) -> cmp::Ordering {
|
||||
compare_components(self.clone(), other.clone())
|
||||
|
@ -1741,7 +1741,7 @@ impl FromStr for PathBuf {
|
|||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<P: AsRef<Path>> iter::FromIterator<P> for PathBuf {
|
||||
impl<P: AsRef<Path>> FromIterator<P> for PathBuf {
|
||||
fn from_iter<I: IntoIterator<Item = P>>(iter: I) -> PathBuf {
|
||||
let mut buf = PathBuf::new();
|
||||
buf.extend(iter);
|
||||
|
@ -1750,7 +1750,7 @@ impl<P: AsRef<Path>> iter::FromIterator<P> for PathBuf {
|
|||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl<P: AsRef<Path>> iter::Extend<P> for PathBuf {
|
||||
impl<P: AsRef<Path>> Extend<P> for PathBuf {
|
||||
fn extend<I: IntoIterator<Item = P>>(&mut self, iter: I) {
|
||||
iter.into_iter().for_each(move |p| self.push(p.as_ref()));
|
||||
}
|
||||
|
@ -1904,7 +1904,7 @@ impl ToOwned for Path {
|
|||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl cmp::PartialEq for PathBuf {
|
||||
impl PartialEq for PathBuf {
|
||||
#[inline]
|
||||
fn eq(&self, other: &PathBuf) -> bool {
|
||||
self.components() == other.components()
|
||||
|
@ -1919,10 +1919,10 @@ impl Hash for PathBuf {
|
|||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl cmp::Eq for PathBuf {}
|
||||
impl Eq for PathBuf {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl cmp::PartialOrd for PathBuf {
|
||||
impl PartialOrd for PathBuf {
|
||||
#[inline]
|
||||
fn partial_cmp(&self, other: &PathBuf) -> Option<cmp::Ordering> {
|
||||
Some(compare_components(self.components(), other.components()))
|
||||
|
@ -1930,7 +1930,7 @@ impl cmp::PartialOrd for PathBuf {
|
|||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl cmp::Ord for PathBuf {
|
||||
impl Ord for PathBuf {
|
||||
#[inline]
|
||||
fn cmp(&self, other: &PathBuf) -> cmp::Ordering {
|
||||
compare_components(self.components(), other.components())
|
||||
|
@ -3025,7 +3025,7 @@ impl fmt::Display for Display<'_> {
|
|||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl cmp::PartialEq for Path {
|
||||
impl PartialEq for Path {
|
||||
#[inline]
|
||||
fn eq(&self, other: &Path) -> bool {
|
||||
self.components() == other.components()
|
||||
|
@ -3084,10 +3084,10 @@ impl Hash for Path {
|
|||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl cmp::Eq for Path {}
|
||||
impl Eq for Path {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl cmp::PartialOrd for Path {
|
||||
impl PartialOrd for Path {
|
||||
#[inline]
|
||||
fn partial_cmp(&self, other: &Path) -> Option<cmp::Ordering> {
|
||||
Some(compare_components(self.components(), other.components()))
|
||||
|
@ -3095,7 +3095,7 @@ impl cmp::PartialOrd for Path {
|
|||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl cmp::Ord for Path {
|
||||
impl Ord for Path {
|
||||
#[inline]
|
||||
fn cmp(&self, other: &Path) -> cmp::Ordering {
|
||||
compare_components(self.components(), other.components())
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
//! marker traits that indicate fundamental properties of types.
|
||||
//! * <code>[std::ops]::{[Drop], [Fn], [FnMut], [FnOnce]}</code>, various
|
||||
//! operations for both destructors and overloading `()`.
|
||||
//! * <code>[std::mem]::[drop][mem::drop]</code>, a convenience function for explicitly
|
||||
//! * <code>[std::mem]::[drop]</code>, a convenience function for explicitly
|
||||
//! dropping a value.
|
||||
//! * <code>[std::boxed]::[Box]</code>, a way to allocate values on the heap.
|
||||
//! * <code>[std::borrow]::[ToOwned]</code>, the conversion trait that defines
|
||||
|
@ -66,7 +66,6 @@
|
|||
//! * <code>[std::convert]::{[TryFrom], [TryInto]}</code>,
|
||||
//! * <code>[std::iter]::[FromIterator]</code>.
|
||||
//!
|
||||
//! [mem::drop]: crate::mem::drop
|
||||
//! [std::borrow]: crate::borrow
|
||||
//! [std::boxed]: crate::boxed
|
||||
//! [std::clone]: crate::clone
|
||||
|
@ -86,9 +85,6 @@
|
|||
//! [std::slice]: crate::slice
|
||||
//! [std::string]: crate::string
|
||||
//! [std::vec]: mod@crate::vec
|
||||
//! [TryFrom]: crate::convert::TryFrom
|
||||
//! [TryInto]: crate::convert::TryInto
|
||||
//! [FromIterator]: crate::iter::FromIterator
|
||||
//! [`to_owned`]: crate::borrow::ToOwned::to_owned
|
||||
//! [book-closures]: ../../book/ch13-01-closures.html
|
||||
//! [book-dtor]: ../../book/ch15-03-drop.html
|
||||
|
|
|
@ -577,7 +577,6 @@ impl Copy for () {
|
|||
/// [`is_null`]: pointer::is_null
|
||||
/// [`offset`]: pointer::offset
|
||||
#[doc = concat!("[`into_raw`]: ", include_str!("../primitive_docs/box_into_raw.md"))]
|
||||
/// [`drop`]: mem::drop
|
||||
/// [`write`]: ptr::write
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
mod prim_pointer {}
|
||||
|
@ -1026,7 +1025,6 @@ mod prim_str {}
|
|||
/// * [`UnwindSafe`]
|
||||
/// * [`RefUnwindSafe`]
|
||||
///
|
||||
/// [`Unpin`]: marker::Unpin
|
||||
/// [`UnwindSafe`]: panic::UnwindSafe
|
||||
/// [`RefUnwindSafe`]: panic::RefUnwindSafe
|
||||
///
|
||||
|
@ -1405,10 +1403,6 @@ mod prim_ref {}
|
|||
///
|
||||
/// *See also the traits [`Fn`], [`FnMut`], and [`FnOnce`].*
|
||||
///
|
||||
/// [`Fn`]: ops::Fn
|
||||
/// [`FnMut`]: ops::FnMut
|
||||
/// [`FnOnce`]: ops::FnOnce
|
||||
///
|
||||
/// Function pointers are pointers that point to *code*, not data. They can be called
|
||||
/// just like functions. Like references, function pointers are, among other things, assumed to
|
||||
/// not be null, so if you want to pass a function pointer over FFI and be able to accommodate null
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
use crate::arch::asm;
|
||||
use crate::cell::UnsafeCell;
|
||||
use crate::cmp;
|
||||
use crate::convert::TryInto;
|
||||
use crate::mem;
|
||||
use crate::ops::{CoerceUnsized, Deref, DerefMut, Index, IndexMut};
|
||||
use crate::ptr::{self, NonNull};
|
||||
|
|
|
@ -273,8 +273,6 @@ pub mod zircon {
|
|||
|
||||
#[cfg(target_os = "fuchsia")]
|
||||
pub fn futex_wait(futex: &AtomicU32, expected: u32, timeout: Option<Duration>) -> bool {
|
||||
use crate::convert::TryFrom;
|
||||
|
||||
// Sleep forever if the timeout is longer than fits in a i64.
|
||||
let deadline = timeout
|
||||
.and_then(|d| {
|
||||
|
|
|
@ -7,7 +7,6 @@ mod tests;
|
|||
|
||||
use crate::os::unix::prelude::*;
|
||||
|
||||
use crate::convert::TryFrom;
|
||||
use crate::error::Error as StdError;
|
||||
use crate::ffi::{CStr, CString, OsStr, OsString};
|
||||
use crate::fmt;
|
||||
|
|
|
@ -166,7 +166,6 @@ impl Process {
|
|||
}
|
||||
|
||||
pub fn wait(&mut self) -> io::Result<ExitStatus> {
|
||||
use crate::default::Default;
|
||||
use crate::sys::process::zircon::*;
|
||||
|
||||
let mut proc_info: zx_info_process_t = Default::default();
|
||||
|
@ -199,7 +198,6 @@ impl Process {
|
|||
}
|
||||
|
||||
pub fn try_wait(&mut self) -> io::Result<Option<ExitStatus>> {
|
||||
use crate::default::Default;
|
||||
use crate::sys::process::zircon::*;
|
||||
|
||||
let mut proc_info: zx_info_process_t = Default::default();
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
mod tests;
|
||||
|
||||
use crate::cmp;
|
||||
use crate::convert::{TryFrom, TryInto};
|
||||
use crate::fmt;
|
||||
use crate::io::{self, BorrowedCursor, ErrorKind, IoSlice, IoSliceMut};
|
||||
use crate::mem;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue