diff --git a/crates/cargo-test-support/src/git.rs b/crates/cargo-test-support/src/git.rs
index 9c606f3e7b8..6f5f13d4596 100644
--- a/crates/cargo-test-support/src/git.rs
+++ b/crates/cargo-test-support/src/git.rs
@@ -39,7 +39,6 @@ use some of the helper functions in this file to interact with the repository.
 */
 
 use crate::{path2url, project, Project, ProjectBuilder};
-use git2;
 use std::fs::{self, File};
 use std::io::prelude::*;
 use std::path::{Path, PathBuf};
diff --git a/crates/cargo-test-support/src/lib.rs b/crates/cargo-test-support/src/lib.rs
index 0143853add0..f3e0a54901d 100644
--- a/crates/cargo-test-support/src/lib.rs
+++ b/crates/cargo-test-support/src/lib.rs
@@ -120,9 +120,7 @@ use std::str;
 use std::time::{self, Duration};
 use std::usize;
 
-use cargo;
 use cargo::util::{is_ci, CargoResult, ProcessBuilder, ProcessError, Rustc};
-use filetime;
 use serde_json::{self, Value};
 use url::Url;
 
diff --git a/tests/testsuite/cargo_command.rs b/tests/testsuite/cargo_command.rs
index 4c0ae2f12b7..d0aab9e7c44 100644
--- a/tests/testsuite/cargo_command.rs
+++ b/tests/testsuite/cargo_command.rs
@@ -6,7 +6,6 @@ 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;
diff --git a/tests/testsuite/concurrent.rs b/tests/testsuite/concurrent.rs
index 41addb8ae65..38b4647010a 100644
--- a/tests/testsuite/concurrent.rs
+++ b/tests/testsuite/concurrent.rs
@@ -13,7 +13,6 @@ use cargo_test_support::git;
 use cargo_test_support::install::{assert_has_installed_exe, cargo_home};
 use cargo_test_support::registry::Package;
 use cargo_test_support::{basic_manifest, execs, project, slow_cpu_multiplier};
-use git2;
 
 fn pkg(name: &str, vers: &str) {
     Package::new(name, vers)
diff --git a/tests/testsuite/cross_compile.rs b/tests/testsuite/cross_compile.rs
index 818f9472a0b..8b346cc7387 100644
--- a/tests/testsuite/cross_compile.rs
+++ b/tests/testsuite/cross_compile.rs
@@ -49,10 +49,10 @@ fn simple_cross() {
 
     let target = cross_compile::alternate();
     p.cargo("build -v --target").arg(&target).run();
-    assert!(p.target_bin(&target, "foo").is_file());
+    assert!(p.target_bin(target, "foo").is_file());
 
     if cross_compile::can_run_on_host() {
-        p.process(&p.target_bin(&target, "foo")).run();
+        p.process(&p.target_bin(target, "foo")).run();
     }
 }
 
@@ -110,10 +110,10 @@ fn simple_cross_config() {
 
     let target = cross_compile::alternate();
     p.cargo("build -v").run();
-    assert!(p.target_bin(&target, "foo").is_file());
+    assert!(p.target_bin(target, "foo").is_file());
 
     if cross_compile::can_run_on_host() {
-        p.process(&p.target_bin(&target, "foo")).run();
+        p.process(&p.target_bin(target, "foo")).run();
     }
 }
 
@@ -146,10 +146,10 @@ fn simple_deps() {
 
     let target = cross_compile::alternate();
     p.cargo("build --target").arg(&target).run();
-    assert!(p.target_bin(&target, "foo").is_file());
+    assert!(p.target_bin(target, "foo").is_file());
 
     if cross_compile::can_run_on_host() {
-        p.process(&p.target_bin(&target, "foo")).run();
+        p.process(&p.target_bin(target, "foo")).run();
     }
 }
 
diff --git a/tests/testsuite/git.rs b/tests/testsuite/git.rs
index adbe8ab396b..9495d362111 100644
--- a/tests/testsuite/git.rs
+++ b/tests/testsuite/git.rs
@@ -1,6 +1,5 @@
 //! Tests for git support.
 
-use git2;
 use std::env;
 use std::fs::{self, File};
 use std::io::prelude::*;
diff --git a/tests/testsuite/git_auth.rs b/tests/testsuite/git_auth.rs
index 39f6c0d4e91..eb1340a7c60 100644
--- a/tests/testsuite/git_auth.rs
+++ b/tests/testsuite/git_auth.rs
@@ -10,7 +10,6 @@ use std::thread;
 
 use cargo_test_support::paths;
 use cargo_test_support::{basic_manifest, project};
-use git2;
 
 // Tests that HTTP auth is offered from `credential.helper`.
 #[cargo_test]
diff --git a/tests/testsuite/git_gc.rs b/tests/testsuite/git_gc.rs
index f4bee6514f2..b8401a56db3 100644
--- a/tests/testsuite/git_gc.rs
+++ b/tests/testsuite/git_gc.rs
@@ -9,7 +9,6 @@ use cargo_test_support::git;
 use cargo_test_support::paths;
 use cargo_test_support::project;
 use cargo_test_support::registry::Package;
-use git2;
 
 use url::Url;
 
diff --git a/tests/testsuite/init.rs b/tests/testsuite/init.rs
index 77c62a50ea7..0196863c5ec 100644
--- a/tests/testsuite/init.rs
+++ b/tests/testsuite/init.rs
@@ -1,6 +1,5 @@
 //! Tests for the `cargo init` command.
 
-use cargo_test_support;
 use std::env;
 use std::fs::{self, File};
 use std::io::prelude::*;
diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs
index c2777f85acb..6ec9e8c9a94 100644
--- a/tests/testsuite/install.rs
+++ b/tests/testsuite/install.rs
@@ -3,8 +3,6 @@
 use std::fs::{self, File, OpenOptions};
 use std::io::prelude::*;
 
-use git2;
-
 use cargo_test_support::cross_compile;
 use cargo_test_support::git;
 use cargo_test_support::install::{
diff --git a/tests/testsuite/login.rs b/tests/testsuite/login.rs
index 836f53054d6..33129141a5e 100644
--- a/tests/testsuite/login.rs
+++ b/tests/testsuite/login.rs
@@ -9,7 +9,6 @@ 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, paths, t};
-use toml;
 
 const TOKEN: &str = "test-token";
 const TOKEN2: &str = "test-token2";
diff --git a/tests/testsuite/metabuild.rs b/tests/testsuite/metabuild.rs
index 004a39e569e..4d9fdc23f3f 100644
--- a/tests/testsuite/metabuild.rs
+++ b/tests/testsuite/metabuild.rs
@@ -4,7 +4,7 @@ use cargo_test_support::{
     basic_lib_manifest, basic_manifest, is_coarse_mtime, project, registry::Package, rustc_host,
     Project,
 };
-use serde_json;
+
 use std::str;
 
 #[cargo_test]
diff --git a/tests/testsuite/owner.rs b/tests/testsuite/owner.rs
index 03a987d72db..6c03a642814 100644
--- a/tests/testsuite/owner.rs
+++ b/tests/testsuite/owner.rs
@@ -9,11 +9,8 @@ use cargo_test_support::registry::{self, api_path, registry_url};
 fn setup(name: &str, content: Option<&str>) {
     let dir = api_path().join(format!("api/v1/crates/{}", name));
     dir.mkdir_p();
-    match content {
-        Some(body) => {
-            fs::write(dir.join("owners"), body).unwrap();
-        }
-        None => {}
+    if let Some(body) = content {
+        fs::write(dir.join("owners"), body).unwrap();
     }
 }
 
diff --git a/tests/testsuite/package.rs b/tests/testsuite/package.rs
index 083b984b34d..668d2024237 100644
--- a/tests/testsuite/package.rs
+++ b/tests/testsuite/package.rs
@@ -1,6 +1,5 @@
 //! Tests for the `cargo package` command.
 
-use std;
 use std::fs::{read_to_string, File};
 use std::io::prelude::*;
 use std::path::Path;
@@ -11,7 +10,6 @@ use cargo_test_support::{
     basic_manifest, cargo_process, git, path2url, paths, project, publish::validate_crate_contents,
     registry, symlink_supported, t,
 };
-use git2;
 
 #[cargo_test]
 fn simple() {
diff --git a/tests/testsuite/patch.rs b/tests/testsuite/patch.rs
index 6660cdb36d8..0be730cdea6 100644
--- a/tests/testsuite/patch.rs
+++ b/tests/testsuite/patch.rs
@@ -7,7 +7,6 @@ use cargo_test_support::git;
 use cargo_test_support::paths;
 use cargo_test_support::registry::Package;
 use cargo_test_support::{basic_manifest, project, t};
-use toml;
 
 #[cargo_test]
 fn replace() {
diff --git a/tests/testsuite/publish_lockfile.rs b/tests/testsuite/publish_lockfile.rs
index 9bd5598975c..7e0964f0d6a 100644
--- a/tests/testsuite/publish_lockfile.rs
+++ b/tests/testsuite/publish_lockfile.rs
@@ -1,6 +1,5 @@
 //! Tests for including `Cargo.lock` when publishing/packaging.
 
-use std;
 use std::fs::File;
 
 use cargo_test_support::registry::Package;
diff --git a/tests/testsuite/test.rs b/tests/testsuite/test.rs
index 636df731c5f..9400f8d5e5d 100644
--- a/tests/testsuite/test.rs
+++ b/tests/testsuite/test.rs
@@ -1,6 +1,5 @@
 //! Tests for the `cargo test` command.
 
-use cargo;
 use cargo_test_support::paths::CargoPathExt;
 use cargo_test_support::registry::Package;
 use cargo_test_support::{
diff --git a/tests/testsuite/version.rs b/tests/testsuite/version.rs
index 5d6fde1c131..f45dabe5fd9 100644
--- a/tests/testsuite/version.rs
+++ b/tests/testsuite/version.rs
@@ -1,6 +1,5 @@
 //! Tests for displaying the cargo version.
 
-use cargo;
 use cargo_test_support::project;
 
 #[cargo_test]