From 862ede716c4de07f1985884b4af25ac874ab4640 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Fri, 1 Mar 2024 10:55:38 +0800 Subject: 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 --- CHANGELOG.md | 3 +++ build.rs | 4 +--- src/display/components/table.rs | 2 +- src/display/ui_state.rs | 1 - 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}, }; -- cgit v1.2.3