From ebd10526f3526b695872a8ecb381f65aaf74c019 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 12 Sep 2019 12:52:46 -0700 Subject: [PATCH] Run rustfmt --- tests/testsuite/alt_registry.rs | 2 +- tests/testsuite/build.rs | 10 +++++----- tests/testsuite/build_script.rs | 2 +- tests/testsuite/cargo_command.rs | 2 +- tests/testsuite/cfg.rs | 2 +- tests/testsuite/config.rs | 2 +- tests/testsuite/corrupt_git.rs | 2 +- tests/testsuite/directory.rs | 2 +- tests/testsuite/git.rs | 2 +- tests/testsuite/install.rs | 4 +++- tests/testsuite/login.rs | 6 +++--- tests/testsuite/path.rs | 2 +- tests/testsuite/registry.rs | 2 +- tests/testsuite/required_features.rs | 4 +++- tests/testsuite/run.rs | 2 +- tests/testsuite/rustdoc.rs | 2 +- tests/testsuite/test.rs | 4 +++- tests/testsuite/version.rs | 2 +- tests/testsuite/workspaces.rs | 2 +- 19 files changed, 31 insertions(+), 25 deletions(-) diff --git a/tests/testsuite/alt_registry.rs b/tests/testsuite/alt_registry.rs index 404f016a93f..6441ab0a8c4 100644 --- a/tests/testsuite/alt_registry.rs +++ b/tests/testsuite/alt_registry.rs @@ -1,7 +1,7 @@ +use cargo::util::IntoUrl; use cargo_test_support::publish::validate_alt_upload; use cargo_test_support::registry::{self, Package}; use cargo_test_support::{basic_manifest, git, paths, project}; -use cargo::util::IntoUrl; use std::fs::{self, File}; use std::io::Write; diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index c53569f8492..7e8708a27ec 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -1,13 +1,13 @@ -use std::env; -use std::fs::{self, File}; -use std::io::prelude::*; +use cargo::util::paths::dylib_path_envvar; use cargo_test_support::paths::{root, CargoPathExt}; use cargo_test_support::registry::Package; use cargo_test_support::{ basic_bin_manifest, basic_lib_manifest, basic_manifest, main_file, project, rustc_host, - sleep_ms, symlink_supported, Execs, ProjectBuilder, t, + sleep_ms, symlink_supported, t, Execs, ProjectBuilder, }; -use cargo::util::paths::dylib_path_envvar; +use std::env; +use std::fs::{self, File}; +use std::io::prelude::*; #[cargo_test] fn cargo_compile_simple() { diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs index 130d15fbbad..a3a13caf81c 100644 --- a/tests/testsuite/build_script.rs +++ b/tests/testsuite/build_script.rs @@ -4,11 +4,11 @@ use std::io; use std::io::prelude::*; use std::thread; +use cargo::util::paths::remove_dir_all; use cargo_test_support::paths::CargoPathExt; use cargo_test_support::registry::Package; use cargo_test_support::{basic_manifest, cross_compile, project}; use cargo_test_support::{rustc_host, sleep_ms, slow_cpu_multiplier}; -use cargo::util::paths::remove_dir_all; #[cargo_test] fn custom_build_script_failed() { diff --git a/tests/testsuite/cargo_command.rs b/tests/testsuite/cargo_command.rs index c5a9f24753a..e0f4cda2e6b 100644 --- a/tests/testsuite/cargo_command.rs +++ b/tests/testsuite/cargo_command.rs @@ -4,11 +4,11 @@ use std::io::prelude::*; use std::path::{Path, PathBuf}; use std::str; +use cargo; use cargo_test_support::cargo_process; use cargo_test_support::paths::{self, CargoPathExt}; use cargo_test_support::registry::Package; use cargo_test_support::{basic_bin_manifest, basic_manifest, cargo_exe, project, Project}; -use cargo; #[cfg_attr(windows, allow(dead_code))] enum FakeKind<'a> { diff --git a/tests/testsuite/cfg.rs b/tests/testsuite/cfg.rs index e66e216cc11..abba59e3523 100644 --- a/tests/testsuite/cfg.rs +++ b/tests/testsuite/cfg.rs @@ -1,10 +1,10 @@ use std::fmt; use std::str::FromStr; +use cargo::util::{Cfg, CfgExpr}; use cargo_test_support::registry::Package; use cargo_test_support::rustc_host; use cargo_test_support::{basic_manifest, project}; -use cargo::util::{Cfg, CfgExpr}; macro_rules! c { ($a:ident) => { diff --git a/tests/testsuite/config.rs b/tests/testsuite/config.rs index 02521c41239..d65fe7a9af0 100644 --- a/tests/testsuite/config.rs +++ b/tests/testsuite/config.rs @@ -5,10 +5,10 @@ use std::io; use std::os; use std::path::Path; -use cargo_test_support::{paths, project, t}; use cargo::core::{enable_nightly_features, Shell}; use cargo::util::config::{self, Config}; use cargo::util::toml::{self, VecStringOrBool as VSOB}; +use cargo_test_support::{paths, project, t}; use serde::Deserialize; fn lines_match(a: &str, b: &str) -> bool { diff --git a/tests/testsuite/corrupt_git.rs b/tests/testsuite/corrupt_git.rs index 2122a79f445..39b9e258474 100644 --- a/tests/testsuite/corrupt_git.rs +++ b/tests/testsuite/corrupt_git.rs @@ -1,9 +1,9 @@ use std::fs; use std::path::{Path, PathBuf}; +use cargo::util::paths as cargopaths; use cargo_test_support::paths; use cargo_test_support::{basic_manifest, git, project}; -use cargo::util::paths as cargopaths; #[cargo_test] fn deleting_database_files() { diff --git a/tests/testsuite/directory.rs b/tests/testsuite/directory.rs index bdc1e79276b..a7d60d1a7d2 100644 --- a/tests/testsuite/directory.rs +++ b/tests/testsuite/directory.rs @@ -9,7 +9,7 @@ use cargo_test_support::cargo_process; use cargo_test_support::git; use cargo_test_support::paths; use cargo_test_support::registry::{cksum, Package}; -use cargo_test_support::{basic_manifest, project, ProjectBuilder, t}; +use cargo_test_support::{basic_manifest, project, t, ProjectBuilder}; fn setup() { let root = paths::root(); diff --git a/tests/testsuite/git.rs b/tests/testsuite/git.rs index 3cb82b63f2a..523fbb79434 100644 --- a/tests/testsuite/git.rs +++ b/tests/testsuite/git.rs @@ -9,8 +9,8 @@ use std::sync::Arc; use std::thread; use cargo_test_support::paths::{self, CargoPathExt}; -use cargo_test_support::{sleep_ms, Project, t}; use cargo_test_support::{basic_lib_manifest, basic_manifest, git, main_file, path2url, project}; +use cargo_test_support::{sleep_ms, t, Project}; fn disable_git_cli() -> bool { // mingw git on Windows does not support Windows-style file URIs. diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index b6d5f100171..2a829bc30b2 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -5,7 +5,9 @@ use git2; use cargo_test_support::cross_compile; use cargo_test_support::git; -use cargo_test_support::install::{assert_has_installed_exe, assert_has_not_installed_exe, cargo_home}; +use cargo_test_support::install::{ + assert_has_installed_exe, assert_has_not_installed_exe, cargo_home, +}; use cargo_test_support::paths; use cargo_test_support::registry::Package; use cargo_test_support::{basic_manifest, cargo_process, project}; diff --git a/tests/testsuite/login.rs b/tests/testsuite/login.rs index 4597b4ad88e..69822207ada 100644 --- a/tests/testsuite/login.rs +++ b/tests/testsuite/login.rs @@ -2,11 +2,11 @@ use std::fs::{self, File}; use std::io::prelude::*; use std::path::PathBuf; -use cargo_test_support::{cargo_process, t}; -use cargo_test_support::install::cargo_home; -use cargo_test_support::registry::{self, registry_url}; use cargo::core::Shell; use cargo::util::config::Config; +use cargo_test_support::install::cargo_home; +use cargo_test_support::registry::{self, registry_url}; +use cargo_test_support::{cargo_process, t}; use toml; const TOKEN: &str = "test-token"; diff --git a/tests/testsuite/path.rs b/tests/testsuite/path.rs index 343e1f360f4..362531ee592 100644 --- a/tests/testsuite/path.rs +++ b/tests/testsuite/path.rs @@ -3,8 +3,8 @@ use std::io::prelude::*; use cargo_test_support::paths::{self, CargoPathExt}; use cargo_test_support::registry::Package; -use cargo_test_support::{sleep_ms, t}; use cargo_test_support::{basic_lib_manifest, basic_manifest, main_file, project}; +use cargo_test_support::{sleep_ms, t}; #[cargo_test] // I have no idea why this is failing spuriously on Windows; diff --git a/tests/testsuite/registry.rs b/tests/testsuite/registry.rs index 4c8f785ca60..b4de94e21e3 100644 --- a/tests/testsuite/registry.rs +++ b/tests/testsuite/registry.rs @@ -2,12 +2,12 @@ use std::fs::{self, File}; use std::io::prelude::*; use std::path::Path; +use cargo::util::paths::remove_dir_all; use cargo_test_support::cargo_process; use cargo_test_support::git; use cargo_test_support::paths::{self, CargoPathExt}; use cargo_test_support::registry::{self, registry_path, registry_url, Dependency, Package}; use cargo_test_support::{basic_manifest, project, t}; -use cargo::util::paths::remove_dir_all; #[cargo_test] fn simple() { diff --git a/tests/testsuite/required_features.rs b/tests/testsuite/required_features.rs index 710ea8eef8c..fd3d72c676c 100644 --- a/tests/testsuite/required_features.rs +++ b/tests/testsuite/required_features.rs @@ -1,4 +1,6 @@ -use cargo_test_support::install::{assert_has_installed_exe, assert_has_not_installed_exe, cargo_home}; +use cargo_test_support::install::{ + assert_has_installed_exe, assert_has_not_installed_exe, cargo_home, +}; use cargo_test_support::is_nightly; use cargo_test_support::project; diff --git a/tests/testsuite/run.rs b/tests/testsuite/run.rs index 42a63a75f72..959873edf66 100644 --- a/tests/testsuite/run.rs +++ b/tests/testsuite/run.rs @@ -1,5 +1,5 @@ -use cargo_test_support::{basic_bin_manifest, basic_lib_manifest, project, Project}; use cargo::util::paths::dylib_path_envvar; +use cargo_test_support::{basic_bin_manifest, basic_lib_manifest, project, Project}; #[cargo_test] fn simple() { diff --git a/tests/testsuite/rustdoc.rs b/tests/testsuite/rustdoc.rs index 0765e69080a..fd8ba61476d 100644 --- a/tests/testsuite/rustdoc.rs +++ b/tests/testsuite/rustdoc.rs @@ -1,4 +1,4 @@ -use cargo_test_support::{basic_manifest, project, is_nightly}; +use cargo_test_support::{basic_manifest, is_nightly, project}; #[cargo_test] fn rustdoc_simple() { diff --git a/tests/testsuite/test.rs b/tests/testsuite/test.rs index 81f5174e248..c61924577b7 100644 --- a/tests/testsuite/test.rs +++ b/tests/testsuite/test.rs @@ -5,7 +5,9 @@ use cargo; use cargo_test_support::paths::CargoPathExt; use cargo_test_support::registry::Package; -use cargo_test_support::{basic_bin_manifest, basic_lib_manifest, basic_manifest, cargo_exe, project}; +use cargo_test_support::{ + basic_bin_manifest, basic_lib_manifest, basic_manifest, cargo_exe, project, +}; use cargo_test_support::{rustc_host, sleep_ms}; #[cargo_test] diff --git a/tests/testsuite/version.rs b/tests/testsuite/version.rs index 59bef08c78c..0cb9fcc97b5 100644 --- a/tests/testsuite/version.rs +++ b/tests/testsuite/version.rs @@ -1,5 +1,5 @@ -use cargo_test_support::project; use cargo; +use cargo_test_support::project; #[cargo_test] fn simple() { diff --git a/tests/testsuite/workspaces.rs b/tests/testsuite/workspaces.rs index 8a7d8449cb7..a86955f908b 100644 --- a/tests/testsuite/workspaces.rs +++ b/tests/testsuite/workspaces.rs @@ -3,8 +3,8 @@ use std::fs::{self, File}; use std::io::{Read, Write}; use cargo_test_support::registry::Package; -use cargo_test_support::{sleep_ms, t}; use cargo_test_support::{basic_lib_manifest, basic_manifest, git, project}; +use cargo_test_support::{sleep_ms, t}; #[cargo_test] fn simple_explicit() {