From 060689fa8847211e6cfc86aeaf5821a49c66b912 Mon Sep 17 00:00:00 2001 From: Thomas O'Donnell Date: Fri, 24 Apr 2020 12:37:13 +0200 Subject: [PATCH] fix: Fix latest clippy suggestions (#1136) Have removed some imports that Clippy says are not needed anymore. --- src/bug_report.rs | 1 - src/config.rs | 1 - src/modules/crystal.rs | 1 - src/modules/elixir.rs | 1 - src/modules/elm.rs | 1 - src/modules/golang.rs | 1 - src/modules/haskell.rs | 1 - src/modules/julia.rs | 1 - src/modules/kubernetes.rs | 1 - src/modules/nodejs.rs | 1 - src/modules/package.rs | 1 - src/modules/php.rs | 1 - src/modules/ruby.rs | 1 - tests/testsuite/aws.rs | 1 - tests/testsuite/git_branch.rs | 1 - tests/testsuite/git_state.rs | 1 - tests/testsuite/git_status.rs | 1 - tests/testsuite/hg_branch.rs | 1 - tests/testsuite/python.rs | 1 - tests/testsuite/terraform.rs | 1 - 20 files changed, 20 deletions(-) diff --git a/src/bug_report.rs b/src/bug_report.rs index 280c8a4a..a6f3eb8d 100644 --- a/src/bug_report.rs +++ b/src/bug_report.rs @@ -204,7 +204,6 @@ fn get_starship_config() -> String { #[cfg(test)] mod tests { use super::*; - use os_info; use std::env; #[test] diff --git a/src/config.rs b/src/config.rs index 50456093..ab86a6ef 100644 --- a/src/config.rs +++ b/src/config.rs @@ -423,7 +423,6 @@ fn parse_color_string(color_string: &str) -> Option { mod tests { use super::*; use starship_module_config_derive::ModuleConfig; - use toml; #[test] fn test_load_config() { diff --git a/src/modules/crystal.rs b/src/modules/crystal.rs index 2243514c..62e4023a 100644 --- a/src/modules/crystal.rs +++ b/src/modules/crystal.rs @@ -51,7 +51,6 @@ mod tests { use ansi_term::Color; use std::fs::File; use std::io; - use tempfile; #[test] fn folder_without_crystal_files() -> io::Result<()> { diff --git a/src/modules/elixir.rs b/src/modules/elixir.rs index 3ef1c984..6eb5ed95 100644 --- a/src/modules/elixir.rs +++ b/src/modules/elixir.rs @@ -63,7 +63,6 @@ mod tests { use ansi_term::Color; use std::fs::File; use std::io; - use tempfile; #[test] fn test_parse_elixir_version() { diff --git a/src/modules/elm.rs b/src/modules/elm.rs index b6c1da4f..48629fa0 100644 --- a/src/modules/elm.rs +++ b/src/modules/elm.rs @@ -42,7 +42,6 @@ mod tests { use ansi_term::Color; use std::fs::{self, File}; use std::io; - use tempfile; #[test] fn folder_without_elm() -> io::Result<()> { diff --git a/src/modules/golang.rs b/src/modules/golang.rs index 809b9b1c..915c24eb 100644 --- a/src/modules/golang.rs +++ b/src/modules/golang.rs @@ -70,7 +70,6 @@ mod tests { use ansi_term::Color; use std::fs::{self, File}; use std::io; - use tempfile; #[test] fn folder_without_go_files() -> io::Result<()> { diff --git a/src/modules/haskell.rs b/src/modules/haskell.rs index 7b28d56a..40d87d8d 100644 --- a/src/modules/haskell.rs +++ b/src/modules/haskell.rs @@ -43,7 +43,6 @@ mod tests { use ansi_term::Color; use std::fs::File; use std::io; - use tempfile; #[test] fn folder_without_stack_yaml() -> io::Result<()> { diff --git a/src/modules/julia.rs b/src/modules/julia.rs index 7d395254..fc5f01b9 100644 --- a/src/modules/julia.rs +++ b/src/modules/julia.rs @@ -55,7 +55,6 @@ mod tests { use ansi_term::Color; use std::fs::File; use std::io; - use tempfile; #[test] fn folder_without_julia_file() -> io::Result<()> { diff --git a/src/modules/kubernetes.rs b/src/modules/kubernetes.rs index e9ffd78e..509ef5d6 100644 --- a/src/modules/kubernetes.rs +++ b/src/modules/kubernetes.rs @@ -1,4 +1,3 @@ -use dirs; use yaml_rust::YamlLoader; use std::env; diff --git a/src/modules/nodejs.rs b/src/modules/nodejs.rs index bc8c2c36..309287dc 100644 --- a/src/modules/nodejs.rs +++ b/src/modules/nodejs.rs @@ -41,7 +41,6 @@ mod tests { use ansi_term::Color; use std::fs::{self, File}; use std::io; - use tempfile; #[test] fn folder_without_node_files() -> io::Result<()> { diff --git a/src/modules/package.rs b/src/modules/package.rs index c309ffeb..e34f90e6 100644 --- a/src/modules/package.rs +++ b/src/modules/package.rs @@ -5,7 +5,6 @@ use crate::utils; use regex::Regex; use serde_json as json; -use toml; use super::{RootModuleConfig, SegmentConfig}; use crate::configs::package::PackageConfig; diff --git a/src/modules/php.rs b/src/modules/php.rs index 59ee4c26..170bfe4f 100644 --- a/src/modules/php.rs +++ b/src/modules/php.rs @@ -58,7 +58,6 @@ mod tests { use ansi_term::Color; use std::fs::File; use std::io; - use tempfile; #[test] fn test_format_php_version() { diff --git a/src/modules/ruby.rs b/src/modules/ruby.rs index 2980cf5a..3a7d3baf 100644 --- a/src/modules/ruby.rs +++ b/src/modules/ruby.rs @@ -56,7 +56,6 @@ mod tests { use ansi_term::Color; use std::fs::File; use std::io; - use tempfile; #[test] fn folder_without_ruby_files() -> io::Result<()> { diff --git a/tests/testsuite/aws.rs b/tests/testsuite/aws.rs index 988238b9..50eca28b 100644 --- a/tests/testsuite/aws.rs +++ b/tests/testsuite/aws.rs @@ -2,7 +2,6 @@ use std::fs::File; use std::io::{self, Write}; use ansi_term::Color; -use tempfile; use crate::common::{self, TestCommand}; diff --git a/tests/testsuite/git_branch.rs b/tests/testsuite/git_branch.rs index c8504a4d..bea10a85 100644 --- a/tests/testsuite/git_branch.rs +++ b/tests/testsuite/git_branch.rs @@ -2,7 +2,6 @@ use ansi_term::Color; use remove_dir_all::remove_dir_all; use std::io; use std::process::Command; -use tempfile; use crate::common::{self, TestCommand}; diff --git a/tests/testsuite/git_state.rs b/tests/testsuite/git_state.rs index 13a0eaed..f3f625d4 100644 --- a/tests/testsuite/git_state.rs +++ b/tests/testsuite/git_state.rs @@ -3,7 +3,6 @@ use std::ffi::OsStr; use std::fs::OpenOptions; use std::io::{self, Error, ErrorKind, Write}; use std::process::{Command, Stdio}; -use tempfile; #[test] fn show_nothing_on_empty_dir() -> io::Result<()> { diff --git a/tests/testsuite/git_status.rs b/tests/testsuite/git_status.rs index eceadb3b..7b71987b 100644 --- a/tests/testsuite/git_status.rs +++ b/tests/testsuite/git_status.rs @@ -4,7 +4,6 @@ use std::fs::{self, File}; use std::io; use std::path::PathBuf; use std::process::Command; -use tempfile; use crate::common::{self, TestCommand}; diff --git a/tests/testsuite/hg_branch.rs b/tests/testsuite/hg_branch.rs index 41bec34e..8e0928f9 100644 --- a/tests/testsuite/hg_branch.rs +++ b/tests/testsuite/hg_branch.rs @@ -3,7 +3,6 @@ use std::fs; use std::path::{Path, PathBuf}; use std::process::Command; use std::{env, io}; -use tempfile; use crate::common::{self, TestCommand}; diff --git a/tests/testsuite/python.rs b/tests/testsuite/python.rs index ffc66612..c996282b 100644 --- a/tests/testsuite/python.rs +++ b/tests/testsuite/python.rs @@ -2,7 +2,6 @@ use std::fs::File; use std::io; use ansi_term::Color; -use tempfile; use crate::common::{self, TestCommand}; diff --git a/tests/testsuite/terraform.rs b/tests/testsuite/terraform.rs index 2d35ab79..188a8940 100644 --- a/tests/testsuite/terraform.rs +++ b/tests/testsuite/terraform.rs @@ -1,7 +1,6 @@ use ansi_term::Color; use std::fs::{self, File}; use std::io::{self, Write}; -use tempfile; use crate::common; use crate::common::TestCommand;