liballoc: prefer imports of borrow from libcore.

This commit is contained in:
Mazdak Farrokhzad 2019-02-02 10:53:27 +01:00
parent f09f62f62c
commit 3bfa0a35f6
7 changed files with 13 additions and 14 deletions

View File

@ -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::*},

View File

@ -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::*};

View File

@ -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

View File

@ -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,
};

View File

@ -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,

View File

@ -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,

View File

@ -74,9 +74,8 @@ use core::{
};
use crate::{
borrow::{ToOwned, Cow},
collections::CollectionAllocErr,
borrow::ToOwned,
borrow::Cow,
boxed::Box,
raw_vec::RawVec,
};