Skip to content

Commit 3900580

Browse files
committed
Reformat use declarations.
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
1 parent 70284c7 commit 3900580

File tree

524 files changed

+1546
-2192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

524 files changed

+1546
-2192
lines changed

alloc/benches/btree/map.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use std::collections::BTreeMap;
22
use std::ops::RangeBounds;
33

4-
use rand::{seq::SliceRandom, Rng};
4+
use rand::seq::SliceRandom;
5+
use rand::Rng;
56
use test::{black_box, Bencher};
67

78
macro_rules! map_insert_rand_bench {

alloc/benches/linked_list.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::collections::LinkedList;
2+
23
use test::Bencher;
34

45
#[bench]

alloc/benches/string.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::iter::repeat;
2+
23
use test::{black_box, Bencher};
34

45
#[bench]

alloc/benches/vec.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
use rand::RngCore;
21
use std::iter::repeat;
2+
3+
use rand::RngCore;
34
use test::{black_box, Bencher};
45

56
#[bench]

alloc/benches/vec_deque.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
use std::{
2-
collections::{vec_deque, VecDeque},
3-
mem,
4-
};
1+
use std::collections::{vec_deque, VecDeque};
2+
use std::mem;
3+
54
use test::{black_box, Bencher};
65

76
#[bench]

alloc/benches/vec_deque_append.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
use std::{collections::VecDeque, time::Instant};
1+
use std::collections::VecDeque;
2+
use std::time::Instant;
23

34
const VECDEQUE_LEN: i32 = 100000;
45
const WARMUP_N: usize = 100;

alloc/src/alloc.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
33
#![stable(feature = "alloc_module", since = "1.28.0")]
44

5+
#[stable(feature = "alloc_module", since = "1.28.0")]
6+
#[doc(inline)]
7+
pub use core::alloc::*;
58
#[cfg(not(test))]
69
use core::hint;
7-
810
#[cfg(not(test))]
911
use core::ptr::{self, NonNull};
1012

11-
#[stable(feature = "alloc_module", since = "1.28.0")]
12-
#[doc(inline)]
13-
pub use core::alloc::*;
14-
1513
#[cfg(test)]
1614
mod tests;
1715

alloc/src/alloc/tests.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
use super::*;
22

33
extern crate test;
4-
use crate::boxed::Box;
54
use test::Bencher;
65

6+
use crate::boxed::Box;
7+
78
#[test]
89
fn allocate_zeroed() {
910
unsafe {

alloc/src/borrow.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22
33
#![stable(feature = "rust1", since = "1.0.0")]
44

5+
#[stable(feature = "rust1", since = "1.0.0")]
6+
pub use core::borrow::{Borrow, BorrowMut};
57
use core::cmp::Ordering;
68
use core::hash::{Hash, Hasher};
79
#[cfg(not(no_global_oom_handling))]
810
use core::ops::{Add, AddAssign};
911
use core::ops::{Deref, DerefPure};
1012

11-
#[stable(feature = "rust1", since = "1.0.0")]
12-
pub use core::borrow::{Borrow, BorrowMut};
13+
use Cow::*;
1314

1415
use crate::fmt;
1516
#[cfg(not(no_global_oom_handling))]
1617
use crate::string::String;
1718

18-
use Cow::*;
19-
2019
#[stable(feature = "rust1", since = "1.0.0")]
2120
impl<'a, B: ?Sized> Borrow<B> for Cow<'a, B>
2221
where

alloc/src/boxed.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,26 +187,26 @@
187187

188188
use core::any::Any;
189189
use core::async_iter::AsyncIterator;
190-
use core::borrow;
191190
#[cfg(not(no_global_oom_handling))]
192191
use core::clone::CloneToUninit;
193192
use core::cmp::Ordering;
194193
use core::error::Error;
195-
use core::fmt;
196194
use core::future::Future;
197195
use core::hash::{Hash, Hasher};
198196
use core::iter::FusedIterator;
199-
use core::marker::Tuple;
200-
use core::marker::Unsize;
197+
use core::marker::{Tuple, Unsize};
201198
use core::mem::{self, SizedTypeProperties};
202-
use core::ops::{AsyncFn, AsyncFnMut, AsyncFnOnce};
203199
use core::ops::{
204-
CoerceUnsized, Coroutine, CoroutineState, Deref, DerefMut, DerefPure, DispatchFromDyn, Receiver,
200+
AsyncFn, AsyncFnMut, AsyncFnOnce, CoerceUnsized, Coroutine, CoroutineState, Deref, DerefMut,
201+
DerefPure, DispatchFromDyn, Receiver,
205202
};
206203
use core::pin::Pin;
207204
use core::ptr::{self, addr_of_mut, NonNull, Unique};
208-
use core::slice;
209205
use core::task::{Context, Poll};
206+
use core::{borrow, fmt, slice};
207+
208+
#[unstable(feature = "thin_box", issue = "92791")]
209+
pub use thin::ThinBox;
210210

211211
#[cfg(not(no_global_oom_handling))]
212212
use crate::alloc::handle_alloc_error;
@@ -222,9 +222,6 @@ use crate::vec;
222222
#[cfg(not(no_global_oom_handling))]
223223
use crate::vec::Vec;
224224

225-
#[unstable(feature = "thin_box", issue = "92791")]
226-
pub use thin::ThinBox;
227-
228225
mod thin;
229226

230227
/// A pointer type that uniquely owns a heap allocation of type `T`.

0 commit comments

Comments
 (0)