mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
liballoc: prefer imports of borrow from libcore.
This commit is contained in:
parent
f09f62f62c
commit
3bfa0a35f6
@ -1,4 +1,5 @@
|
||||
use core::{
|
||||
borrow::Borrow,
|
||||
cmp::Ordering,
|
||||
fmt::Debug,
|
||||
hash::{Hash, Hasher},
|
||||
@ -11,8 +12,6 @@ use core::{
|
||||
fmt, intrinsics, mem, ptr,
|
||||
};
|
||||
|
||||
use crate::borrow::Borrow;
|
||||
|
||||
use super::{
|
||||
node::{self, Handle, NodeRef, marker, InsertResult::*, ForceResult::*},
|
||||
search::{self, SearchResult::*},
|
||||
|
@ -1,6 +1,7 @@
|
||||
use core::cmp::Ordering;
|
||||
|
||||
use crate::borrow::Borrow;
|
||||
use core::{
|
||||
borrow::Borrow,
|
||||
cmp::Ordering,
|
||||
};
|
||||
|
||||
use super::node::{Handle, NodeRef, marker, ForceResult::*};
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
// to TreeMap
|
||||
|
||||
use core::{
|
||||
borrow::Borrow,
|
||||
cmp::{
|
||||
Ordering::{self, Less, Greater, Equal},
|
||||
min, max,
|
||||
@ -11,10 +12,7 @@ use core::{
|
||||
ops::{BitOr, BitAnd, BitXor, Sub, RangeBounds},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
borrow::Borrow,
|
||||
collections::btree_map::{self, BTreeMap, Keys},
|
||||
};
|
||||
use crate::collections::btree_map::{self, BTreeMap, Keys};
|
||||
use super::Recover;
|
||||
|
||||
// FIXME(conventions): implement bounded iterators
|
||||
|
@ -88,6 +88,7 @@
|
||||
#![cfg_attr(test, allow(unused_imports, dead_code))]
|
||||
|
||||
use core::{
|
||||
borrow::{Borrow, BorrowMut},
|
||||
cmp::Ordering::{self, Less},
|
||||
mem::{self, size_of},
|
||||
ptr,
|
||||
@ -95,7 +96,7 @@ use core::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
borrow::{Borrow, BorrowMut, ToOwned},
|
||||
borrow::ToOwned,
|
||||
boxed::Box,
|
||||
vec::Vec,
|
||||
};
|
||||
|
@ -29,6 +29,7 @@
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use core::{
|
||||
borrow::Borrow,
|
||||
fmt,
|
||||
str::{
|
||||
self as core_str,
|
||||
@ -41,7 +42,7 @@ use core::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
borrow::{Borrow, ToOwned},
|
||||
borrow::ToOwned,
|
||||
boxed::Box,
|
||||
slice::{SliceConcatExt, SliceIndex},
|
||||
string::String,
|
||||
|
@ -64,8 +64,8 @@ use core::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
collections::CollectionAllocErr,
|
||||
borrow::{Cow, ToOwned},
|
||||
collections::CollectionAllocErr,
|
||||
boxed::Box,
|
||||
str::{self, from_boxed_utf8_unchecked, FromStr, Utf8Error, Chars},
|
||||
vec::Vec,
|
||||
|
@ -74,9 +74,8 @@ use core::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
borrow::{ToOwned, Cow},
|
||||
collections::CollectionAllocErr,
|
||||
borrow::ToOwned,
|
||||
borrow::Cow,
|
||||
boxed::Box,
|
||||
raw_vec::RawVec,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user