fix(rust): clean up unused Rust warnings in bridge, network, and server modules

This commit is contained in:
2026-04-01 03:58:10 +00:00
parent 3f40506246
commit 96a3159c5d
5 changed files with 11 additions and 3 deletions

View File

@@ -1,5 +1,12 @@
# Changelog
## 2026-04-01 - 1.19.1 - fix(rust)
clean up unused Rust warnings in bridge, network, and server modules
- remove the unused error import from the bridge module
- mark IpPool.prefix_len as intentionally unused to suppress dead code warnings
- rename the unused socket shutdown sender binding in the server to an underscore-prefixed variable
## 2026-04-01 - 1.19.0 - feat(forwarding)
add hybrid forwarding mode with per-client bridge and VLAN settings

View File

@@ -13,7 +13,7 @@ use std::net::Ipv4Addr;
use std::sync::Arc;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::sync::mpsc;
use tracing::{debug, error, info, warn};
use tracing::{debug, info, warn};
use crate::server::ServerState;

View File

@@ -8,6 +8,7 @@ pub struct IpPool {
/// Network address (e.g., 10.8.0.0)
network: Ipv4Addr,
/// Prefix length (e.g., 24)
#[allow(dead_code)]
prefix_len: u8,
/// Allocated IPs: IP -> client_id
allocated: HashMap<Ipv4Addr, String>,

View File

@@ -319,7 +319,7 @@ impl VpnServer {
// Socket engine setup
let (s_tx, s_rx) = mpsc::channel::<Vec<u8>>(4096);
let (s_shut_tx, s_shut_rx) = mpsc::channel::<()>(1);
let (_s_shut_tx, s_shut_rx) = mpsc::channel::<()>(1);
// Bridge engine setup
let phys_iface = match &config.bridge_physical_interface {

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartvpn',
version: '1.19.0',
version: '1.19.1',
description: 'A VPN solution with TypeScript control plane and Rust data plane daemon'
}