Skip to content

Commit 748970d

Browse files
committed
liballoc: apply uniform_paths.
1 parent 3bfa0a3 commit 748970d

File tree

9 files changed

+20
-19
lines changed

9 files changed

+20
-19
lines changed

src/liballoc/alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ pub fn handle_alloc_error(layout: Layout) -> ! {
229229
#[cfg(test)]
230230
mod tests {
231231
extern crate test;
232-
use self::test::Bencher;
232+
use test::Bencher;
233233
use crate::{
234234
boxed::Box,
235235
alloc::{Global, Alloc, Layout, handle_alloc_error},

src/liballoc/borrow.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ use core::{
88
ops::{Add, AddAssign, Deref},
99
};
1010

11-
use crate::{fmt, string::String};
12-
13-
use self::Cow::*;
14-
1511
#[stable(feature = "rust1", since = "1.0.0")]
1612
pub use core::borrow::{Borrow, BorrowMut};
1713

14+
use crate::{fmt, string::String};
15+
16+
use Cow::*;
17+
1818
#[stable(feature = "rust1", since = "1.0.0")]
1919
impl<'a, B: ?Sized> Borrow<B> for Cow<'a, B>
2020
where B: ToOwned,

src/liballoc/collections/btree/map.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ use super::{
1717
search::{self, SearchResult::*},
1818
};
1919

20-
use self::{UnderflowResult::*, Entry::*};
20+
use UnderflowResult::*;
21+
use Entry::*;
2122

2223
/// A map based on a B-Tree.
2324
///

src/liballoc/collections/btree/search.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use core::{
55

66
use super::node::{Handle, NodeRef, marker, ForceResult::*};
77

8-
use self::SearchResult::*;
8+
use SearchResult::*;
99

1010
pub enum SearchResult<BorrowType, K, V, FoundType, GoDownType> {
1111
Found(Handle<NodeRef<BorrowType, K, V, FoundType>, marker::KV>),

src/liballoc/collections/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ pub mod btree_set {
2323

2424
#[stable(feature = "rust1", since = "1.0.0")]
2525
#[doc(no_inline)]
26-
pub use self::binary_heap::BinaryHeap;
26+
pub use binary_heap::BinaryHeap;
2727

2828
#[stable(feature = "rust1", since = "1.0.0")]
2929
#[doc(no_inline)]
30-
pub use self::btree_map::BTreeMap;
30+
pub use btree_map::BTreeMap;
3131

3232
#[stable(feature = "rust1", since = "1.0.0")]
3333
#[doc(no_inline)]
34-
pub use self::btree_set::BTreeSet;
34+
pub use btree_set::BTreeSet;
3535

3636
#[stable(feature = "rust1", since = "1.0.0")]
3737
#[doc(no_inline)]
38-
pub use self::linked_list::LinkedList;
38+
pub use linked_list::LinkedList;
3939

4040
#[stable(feature = "rust1", since = "1.0.0")]
4141
#[doc(no_inline)]
42-
pub use self::vec_deque::VecDeque;
42+
pub use vec_deque::VecDeque;
4343

4444
use crate::alloc::{AllocErr, LayoutErr};
4545

src/liballoc/raw_vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,14 +624,14 @@ enum Fallibility {
624624
Infallible,
625625
}
626626

627-
use self::Fallibility::*;
627+
use Fallibility::*;
628628

629629
enum ReserveStrategy {
630630
Exact,
631631
Amortized,
632632
}
633633

634-
use self::ReserveStrategy::*;
634+
use ReserveStrategy::*;
635635

636636
impl<T, A: Alloc> RawVec<T, A> {
637637
fn reserve_internal(

src/liballoc/slice.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ pub use core::slice::{RChunks, RChunksMut, RChunksExact, RChunksExactMut};
129129
// HACK(japaric) needed for the implementation of `vec!` macro during testing
130130
// NB see the hack module in this file for more details
131131
#[cfg(test)]
132-
pub use self::hack::into_vec;
132+
pub use hack::into_vec;
133133

134134
// HACK(japaric) needed for the implementation of `Vec::clone` during testing
135135
// NB see the hack module in this file for more details
136136
#[cfg(test)]
137-
pub use self::hack::to_vec;
137+
pub use hack::to_vec;
138138

139139
// HACK(japaric): With cfg(test) `impl [T]` is not available, these three
140140
// functions are actually methods that are in `impl [T]` but not in

src/liballoc/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pub use core::task::*;
44

55
#[cfg(all(target_has_atomic = "ptr", target_has_atomic = "cas"))]
6-
pub use self::if_arc::*;
6+
pub use if_arc::*;
77

88
#[cfg(all(target_has_atomic = "ptr", target_has_atomic = "cas"))]
99
mod if_arc {

src/liballoc/tests/vec_deque.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use std::{
1010

1111
use crate::hash;
1212

13-
use self::Taggy::*;
14-
use self::Taggypar::*;
13+
use Taggy::*;
14+
use Taggypar::*;
1515

1616
#[test]
1717
fn test_simple() {

0 commit comments

Comments
 (0)