liballoc: apply uniform_paths.

This commit is contained in:
Mazdak Farrokhzad 2019-02-02 11:05:20 +01:00
parent 3bfa0a35f6
commit 748970dfa9
9 changed files with 20 additions and 19 deletions

View file

@ -229,7 +229,7 @@ pub fn handle_alloc_error(layout: Layout) -> ! {
#[cfg(test)]
mod tests {
extern crate test;
use self::test::Bencher;
use test::Bencher;
use crate::{
boxed::Box,
alloc::{Global, Alloc, Layout, handle_alloc_error},

View file

@ -8,13 +8,13 @@ use core::{
ops::{Add, AddAssign, Deref},
};
use crate::{fmt, string::String};
use self::Cow::*;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::borrow::{Borrow, BorrowMut};
use crate::{fmt, string::String};
use Cow::*;
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, B: ?Sized> Borrow<B> for Cow<'a, B>
where B: ToOwned,

View file

@ -17,7 +17,8 @@ use super::{
search::{self, SearchResult::*},
};
use self::{UnderflowResult::*, Entry::*};
use UnderflowResult::*;
use Entry::*;
/// A map based on a B-Tree.
///

View file

@ -5,7 +5,7 @@ use core::{
use super::node::{Handle, NodeRef, marker, ForceResult::*};
use self::SearchResult::*;
use SearchResult::*;
pub enum SearchResult<BorrowType, K, V, FoundType, GoDownType> {
Found(Handle<NodeRef<BorrowType, K, V, FoundType>, marker::KV>),

View file

@ -23,23 +23,23 @@ pub mod btree_set {
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)]
pub use self::binary_heap::BinaryHeap;
pub use binary_heap::BinaryHeap;
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)]
pub use self::btree_map::BTreeMap;
pub use btree_map::BTreeMap;
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)]
pub use self::btree_set::BTreeSet;
pub use btree_set::BTreeSet;
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)]
pub use self::linked_list::LinkedList;
pub use linked_list::LinkedList;
#[stable(feature = "rust1", since = "1.0.0")]
#[doc(no_inline)]
pub use self::vec_deque::VecDeque;
pub use vec_deque::VecDeque;
use crate::alloc::{AllocErr, LayoutErr};

View file

@ -624,14 +624,14 @@ enum Fallibility {
Infallible,
}
use self::Fallibility::*;
use Fallibility::*;
enum ReserveStrategy {
Exact,
Amortized,
}
use self::ReserveStrategy::*;
use ReserveStrategy::*;
impl<T, A: Alloc> RawVec<T, A> {
fn reserve_internal(

View file

@ -129,12 +129,12 @@ pub use core::slice::{RChunks, RChunksMut, RChunksExact, RChunksExactMut};
// HACK(japaric) needed for the implementation of `vec!` macro during testing
// NB see the hack module in this file for more details
#[cfg(test)]
pub use self::hack::into_vec;
pub use hack::into_vec;
// HACK(japaric) needed for the implementation of `Vec::clone` during testing
// NB see the hack module in this file for more details
#[cfg(test)]
pub use self::hack::to_vec;
pub use hack::to_vec;
// HACK(japaric): With cfg(test) `impl [T]` is not available, these three
// functions are actually methods that are in `impl [T]` but not in

View file

@ -3,7 +3,7 @@
pub use core::task::*;
#[cfg(all(target_has_atomic = "ptr", target_has_atomic = "cas"))]
pub use self::if_arc::*;
pub use if_arc::*;
#[cfg(all(target_has_atomic = "ptr", target_has_atomic = "cas"))]
mod if_arc {

View file

@ -10,8 +10,8 @@ use std::{
use crate::hash;
use self::Taggy::*;
use self::Taggypar::*;
use Taggy::*;
use Taggypar::*;
#[test]
fn test_simple() {