summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcyqsimon <28627918+cyqsimon@users.noreply.github.com>2024-03-01 10:55:38 +0800
committerGitHub <noreply@github.com>2024-03-01 10:55:38 +0800
commit862ede716c4de07f1985884b4af25ac874ab4640 (patch)
tree2fd6144571788ba861d630676a45673b6eddd25f
parent5f5cc7ed609e8eff29ee0c580e60c468273bf171 (diff)
Remove redundant imports (#377)
* Remove redundant imports - Now linted by clippy in 1.78 - See https://github.com/rust-lang/rust/pull/117772 * Write changelog * Remove Windows-only redundant imports in build script
-rw-r--r--CHANGELOG.md3
-rw-r--r--build.rs4
-rw-r--r--src/display/components/table.rs2
-rw-r--r--src/display/ui_state.rs1
4 files changed, 5 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b96cb9..cb4a04b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]
+## Fixed
+* Remove redundant imports #377 - @cyqsimon
+
## Added
* CI: include generated assets in release archive #359 - @cyqsimon
diff --git a/build.rs b/build.rs
index 7481214..0890ab1 100644
--- a/build.rs
+++ b/build.rs
@@ -39,12 +39,10 @@ fn build_completion_manpage() -> anyhow::Result<()> {
#[cfg(target_os = "windows")]
fn download_windows_npcap_sdk() -> anyhow::Result<()> {
use std::{
- env, fs,
+ fs,
io::{self, Write},
- path::PathBuf,
};
- use anyhow::anyhow;
use http_req::request;
use zip::ZipArchive;
diff --git a/src/display/components/table.rs b/src/display/components/table.rs
index 6e602d1..2b450b1 100644
--- a/src/display/components/table.rs
+++ b/src/display/components/table.rs
@@ -1,4 +1,4 @@
-use std::{collections::HashMap, fmt, iter::FromIterator, net::IpAddr, ops::Index, rc::Rc};
+use std::{collections::HashMap, fmt, net::IpAddr, ops::Index, rc::Rc};
use derivative::Derivative;
use itertools::Itertools;
diff --git a/src/display/ui_state.rs b/src/display/ui_state.rs
index 37ff639..8b73571 100644
--- a/src/display/ui_state.rs
+++ b/src/display/ui_state.rs
@@ -2,7 +2,6 @@ use std::{
cmp,
collections::{HashMap, HashSet, VecDeque},
hash::Hash,
- iter::FromIterator,
net::{IpAddr, Ipv4Addr, Ipv6Addr},
};