From e7a97c0c0c2cbe384e66d0a0aedd722cb4caaa52 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:20:41 +0800 Subject: [PATCH 1/3] Remove redundant imports - Now linted by clippy in 1.78 - See https://github.com/rust-lang/rust/pull/117772 --- src/display/components/table.rs | 2 +- src/display/ui_state.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/display/components/table.rs b/src/display/components/table.rs index 6e602d111..2b450b1f6 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 37ff63977..8b73571c7 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}, }; From 539b875ff20708adf312a44c94a731f5a4f337fa Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:28:26 +0800 Subject: [PATCH 2/3] Write changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b96cb93c..cb4a04b89 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 From ec38e96dcb4c66cedefb888ad447a3cdc1202788 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:36:41 +0800 Subject: [PATCH 3/3] Remove Windows-only redundant imports in build script --- build.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.rs b/build.rs index 748121496..0890ab1b7 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;