Skip to content

Commit d816dac

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 1e117cf commit d816dac

24 files changed

+69
-80
lines changed

build_system/src/build.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
use crate::config::{Channel, ConfigInfo};
2-
use crate::utils::{
3-
copy_file, create_dir, get_sysroot_dir, run_command, run_command_with_output_and_env, walk_dir,
4-
};
51
use std::collections::HashMap;
62
use std::ffi::OsStr;
73
use std::fs;
84
use std::path::Path;
95

6+
use crate::config::{Channel, ConfigInfo};
7+
use crate::utils::{
8+
copy_file, create_dir, get_sysroot_dir, run_command, run_command_with_output_and_env, walk_dir,
9+
};
10+
1011
#[derive(Default)]
1112
struct BuildArg {
1213
flags: Vec<String>,

build_system/src/clean.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use crate::utils::{get_sysroot_dir, remove_file, run_command};
2-
31
use std::fs::remove_dir_all;
42
use std::path::Path;
53

4+
use crate::utils::{get_sysroot_dir, remove_file, run_command};
5+
66
#[derive(Default)]
77
enum CleanArg {
88
/// `clean all`

build_system/src/clone_gcc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
use std::path::{Path, PathBuf};
2+
13
use crate::config::ConfigInfo;
24
use crate::utils::{git_clone, run_command_with_output};
35

4-
use std::path::{Path, PathBuf};
5-
66
fn show_usage() {
77
println!(
88
r#"

build_system/src/config.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
use crate::utils::{
2-
create_dir, create_symlink, get_os_name, get_sysroot_dir, run_command_with_output,
3-
rustc_version_info, split_args,
4-
};
51
use std::collections::HashMap;
6-
use std::env as std_env;
72
use std::ffi::OsStr;
8-
use std::fs;
93
use std::path::{Path, PathBuf};
4+
use std::{env as std_env, fs};
5+
6+
use boml::types::TomlValue;
7+
use boml::Toml;
108

11-
use boml::{types::TomlValue, Toml};
9+
use crate::utils::{
10+
create_dir, create_symlink, get_os_name, get_sysroot_dir, run_command_with_output,
11+
rustc_version_info, split_args,
12+
};
1213

1314
#[derive(Default, PartialEq, Eq, Clone, Copy, Debug)]
1415
pub enum Channel {

build_system/src/fmt.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
use crate::utils::run_command_with_output;
21
use std::ffi::OsStr;
32
use std::path::Path;
43

4+
use crate::utils::run_command_with_output;
5+
56
fn show_usage() {
67
println!(
78
r#"

build_system/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use std::env;
2-
use std::process;
1+
use std::{env, process};
32

43
mod build;
54
mod clean;

build_system/src/prepare.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
use std::fs;
2+
use std::path::{Path, PathBuf};
3+
14
use crate::rustc_info::get_rustc_path;
25
use crate::utils::{
36
cargo_install, create_dir, get_sysroot_dir, git_clone_root_dir, remove_file, run_command,
47
run_command_with_output, walk_dir,
58
};
69

7-
use std::fs;
8-
use std::path::{Path, PathBuf};
9-
1010
fn prepare_libcore(
1111
sysroot_path: &Path,
1212
libgccjit12_patches: bool,

build_system/src/rust_tools.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
use std::collections::HashMap;
2+
use std::ffi::OsStr;
3+
use std::path::PathBuf;
4+
15
use crate::config::ConfigInfo;
26
use crate::utils::{
37
get_toolchain, run_command_with_output_and_env_no_err, rustc_toolchain_version_info,
48
rustc_version_info,
59
};
610

7-
use std::collections::HashMap;
8-
use std::ffi::OsStr;
9-
use std::path::PathBuf;
10-
1111
fn args(command: &str) -> Result<Option<Vec<String>>, String> {
1212
// We skip the binary and the "cargo"/"rustc" option.
1313
if let Some("--help") = std::env::args().skip(2).next().as_deref() {

build_system/src/test.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
use std::collections::HashMap;
2+
use std::ffi::OsStr;
3+
use std::fs::{remove_dir_all, File};
4+
use std::io::{BufRead, BufReader};
5+
use std::path::{Path, PathBuf};
6+
use std::str::FromStr;
7+
18
use crate::build;
29
use crate::config::{Channel, ConfigInfo};
310
use crate::utils::{
@@ -6,13 +13,6 @@ use crate::utils::{
613
split_args, walk_dir,
714
};
815

9-
use std::collections::HashMap;
10-
use std::ffi::OsStr;
11-
use std::fs::{remove_dir_all, File};
12-
use std::io::{BufRead, BufReader};
13-
use std::path::{Path, PathBuf};
14-
use std::str::FromStr;
15-
1616
type Env = HashMap<String, String>;
1717
type Runner = fn(&Env, &TestArg) -> Result<(), String>;
1818
type Runners = HashMap<&'static str, (&'static str, Runner)>;

src/archive.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ use std::path::{Path, PathBuf};
33
use rustc_codegen_ssa::back::archive::{
44
ArArchiveBuilder, ArchiveBuilder, ArchiveBuilderBuilder, DEFAULT_OBJECT_READER,
55
};
6-
use rustc_session::Session;
7-
86
use rustc_session::cstore::DllImport;
7+
use rustc_session::Session;
98

109
pub(crate) struct ArArchiveBuilderBuilder;
1110

0 commit comments

Comments
 (0)