优化部分语法警告

This commit is contained in:
桥下红药
2026-01-18 17:33:29 +08:00
parent e89f814895
commit d38cb835d4
10 changed files with 438 additions and 345 deletions
+3 -8
View File
@@ -1,18 +1,13 @@
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum NetMode {
Ipv4Only,
Ipv6Only,
#[default]
DualStack,
}
impl Default for NetMode {
fn default() -> Self {
Self::DualStack
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TorrentInfo {
pub info_hash: String,
@@ -85,4 +80,4 @@ impl Default for DHTOptions {
node_queue_capacity: 100000,
}
}
}
}