优化部分语法警告
This commit is contained in:
+3
-8
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user