fix clippy 1.70 warning

This commit is contained in:
Zhang Jingqiang 2023-05-31 10:58:01 +08:00
parent 2255b21cba
commit 803f826d6a
2 changed files with 2 additions and 12 deletions

View file

@ -21,15 +21,9 @@ use std::str::FromStr;
use anyhow::anyhow;
use rustc_hash::FxHashSet;
#[derive(Clone, Eq, PartialEq)]
#[derive(Clone, Default, Eq, PartialEq)]
pub struct Ports(FxHashSet<u16>);
impl Default for Ports {
fn default() -> Self {
Ports(FxHashSet::default())
}
}
impl Ports {
pub fn add_single(&mut self, port: u16) {
self.0.insert(port);