修复部分警告

This commit is contained in:
ziyouwa
2024-05-14 13:03:19 +08:00
parent 16d618cee2
commit 979a3709ff
3 changed files with 4 additions and 3 deletions

View File

@@ -22,6 +22,6 @@ fn main() {
);
let generated_code = format!(r#"pub const SERIAL_NUMBER: &str = "{}";"#, serial_number);
let dest_path = "src/generated_serial_number.rs";
let mut file = File::create(&dest_path).unwrap();
let mut file = File::create(dest_path).unwrap();
file.write_all(generated_code.as_bytes()).unwrap();
}

View File

@@ -592,7 +592,8 @@ impl ServerPacketHandler {
context: &Context,
) {
let mut status_info = ClientStatusInfo::default();
status_info.p2p_list = client_status_info
let iplist = &mut status_info.p2p_list;
*iplist = client_status_info
.p2p_list
.iter()
.map(|v| v.next_ip.into())

View File

@@ -15,7 +15,7 @@ mod error;
mod generated_serial_number;
mod proto;
mod protocol;
pub const VNT_VERSION: &'static str = env!("CARGO_PKG_VERSION");
pub const VNT_VERSION: &str = env!("CARGO_PKG_VERSION");
/// 默认网关信息
const GATEWAY: Ipv4Addr = Ipv4Addr::new(10, 26, 0, 1);