about summary refs log tree commit diff
path: root/library/std/tests
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/tests')
-rw-r--r--library/std/tests/common/mod.rs7
-rw-r--r--library/std/tests/create_dir_all_bare.rs3
-rw-r--r--library/std/tests/env.rs3
-rw-r--r--library/std/tests/pipe_subprocess.rs4
-rw-r--r--library/std/tests/process_spawning.rs5
-rw-r--r--library/std/tests/switch-stdout.rs5
-rw-r--r--library/std/tests/windows.rs4
7 files changed, 15 insertions, 16 deletions
diff --git a/library/std/tests/common/mod.rs b/library/std/tests/common/mod.rs
index 1aad6549e76..7cf70c725e4 100644
--- a/library/std/tests/common/mod.rs
+++ b/library/std/tests/common/mod.rs
@@ -1,10 +1,9 @@
 #![allow(unused)]
 
-use rand::RngCore;
-use std::env;
-use std::fs;
 use std::path::{Path, PathBuf};
-use std::thread;
+use std::{env, fs, thread};
+
+use rand::RngCore;
 
 /// Copied from `std::test_helpers::test_rng`, since these tests rely on the
 /// seed not being the same for every RNG invocation too.
diff --git a/library/std/tests/create_dir_all_bare.rs b/library/std/tests/create_dir_all_bare.rs
index 79c3c8f528e..8becf713205 100644
--- a/library/std/tests/create_dir_all_bare.rs
+++ b/library/std/tests/create_dir_all_bare.rs
@@ -3,9 +3,8 @@
 //! Note that this test changes the current directory so
 //! should not be in the same process as other tests.
 
-use std::env;
-use std::fs;
 use std::path::{Path, PathBuf};
+use std::{env, fs};
 
 mod common;
 
diff --git a/library/std/tests/env.rs b/library/std/tests/env.rs
index a1ca85c2145..4e472b4ce99 100644
--- a/library/std/tests/env.rs
+++ b/library/std/tests/env.rs
@@ -4,9 +4,10 @@ use std::ffi::{OsStr, OsString};
 use rand::distributions::{Alphanumeric, DistString};
 
 mod common;
-use common::test_rng;
 use std::thread;
 
+use common::test_rng;
+
 #[track_caller]
 fn make_rand_name() -> OsString {
     let n = format!("TEST{}", Alphanumeric.sample_string(&mut test_rng(), 10));
diff --git a/library/std/tests/pipe_subprocess.rs b/library/std/tests/pipe_subprocess.rs
index c2278098b9b..1535742a83a 100644
--- a/library/std/tests/pipe_subprocess.rs
+++ b/library/std/tests/pipe_subprocess.rs
@@ -3,7 +3,9 @@
 fn main() {
     #[cfg(all(not(miri), any(unix, windows)))]
     {
-        use std::{env, io::Read, pipe::pipe, process};
+        use std::io::Read;
+        use std::pipe::pipe;
+        use std::{env, process};
 
         if env::var("I_AM_THE_CHILD").is_ok() {
             child();
diff --git a/library/std/tests/process_spawning.rs b/library/std/tests/process_spawning.rs
index c56c111c37d..d249eb7d50a 100644
--- a/library/std/tests/process_spawning.rs
+++ b/library/std/tests/process_spawning.rs
@@ -1,9 +1,6 @@
 #![cfg(not(target_env = "sgx"))]
 
-use std::env;
-use std::fs;
-use std::process;
-use std::str;
+use std::{env, fs, process, str};
 
 mod common;
 
diff --git a/library/std/tests/switch-stdout.rs b/library/std/tests/switch-stdout.rs
index 0afe18088fa..42011a9b3da 100644
--- a/library/std/tests/switch-stdout.rs
+++ b/library/std/tests/switch-stdout.rs
@@ -5,11 +5,10 @@ use std::io::{Read, Write};
 
 mod common;
 
-#[cfg(windows)]
-use std::os::windows::io::OwnedHandle;
-
 #[cfg(unix)]
 use std::os::fd::OwnedFd;
+#[cfg(windows)]
+use std::os::windows::io::OwnedHandle;
 
 #[cfg(unix)]
 fn switch_stdout_to(file: OwnedFd) -> OwnedFd {
diff --git a/library/std/tests/windows.rs b/library/std/tests/windows.rs
index 9f7596f1bc2..dab3182b818 100644
--- a/library/std/tests/windows.rs
+++ b/library/std/tests/windows.rs
@@ -1,7 +1,9 @@
 #![cfg(windows)]
 //! An external tests
 
-use std::{ffi::OsString, os::windows::ffi::OsStringExt, path::PathBuf};
+use std::ffi::OsString;
+use std::os::windows::ffi::OsStringExt;
+use std::path::PathBuf;
 
 #[test]
 #[should_panic]