Skip to content

Commit

Permalink
liballoc: prefer imports of borrow from libcore.
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Feb 2, 2019
1 parent f09f62f commit 3bfa0a3
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
3 changes: 1 addition & 2 deletions src/liballoc/collections/btree/map.rs
@@ -1,4 +1,5 @@
use core::{
borrow::Borrow,
cmp::Ordering,
fmt::Debug,
hash::{Hash, Hasher},
Expand All @@ -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::*},
Expand Down
7 changes: 4 additions & 3 deletions src/liballoc/collections/btree/search.rs
@@ -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::*};

Expand Down
6 changes: 2 additions & 4 deletions src/liballoc/collections/btree/set.rs
Expand Up @@ -2,6 +2,7 @@
// to TreeMap

use core::{
borrow::Borrow,
cmp::{
Ordering::{self, Less, Greater, Equal},
min, max,
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/liballoc/slice.rs
Expand Up @@ -88,14 +88,15 @@
#![cfg_attr(test, allow(unused_imports, dead_code))]

use core::{
borrow::{Borrow, BorrowMut},
cmp::Ordering::{self, Less},
mem::{self, size_of},
ptr,
u8, u16, u32,
};

use crate::{
borrow::{Borrow, BorrowMut, ToOwned},
borrow::ToOwned,
boxed::Box,
vec::Vec,
};
Expand Down
3 changes: 2 additions & 1 deletion src/liballoc/str.rs
Expand Up @@ -29,6 +29,7 @@
#![allow(unused_imports)]

use core::{
borrow::Borrow,
fmt,
str::{
self as core_str,
Expand All @@ -41,7 +42,7 @@ use core::{
};

use crate::{
borrow::{Borrow, ToOwned},
borrow::ToOwned,
boxed::Box,
slice::{SliceConcatExt, SliceIndex},
string::String,
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/string.rs
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions src/liballoc/vec.rs
Expand Up @@ -74,9 +74,8 @@ use core::{
};

use crate::{
borrow::{ToOwned, Cow},
collections::CollectionAllocErr,
borrow::ToOwned,
borrow::Cow,
boxed::Box,
raw_vec::RawVec,
};
Expand Down

0 comments on commit 3bfa0a3

Please sign in to comment.