warning
This commit is contained in:
parent
209b870942
commit
42d9c3125f
@ -34,7 +34,7 @@ async fn client(address: &str) -> Result<()> {
|
|||||||
tokio::time::sleep(Duration::from_millis(5000)).await;
|
tokio::time::sleep(Duration::from_millis(5000)).await;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
// Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
@ -77,10 +77,10 @@ async fn main() -> Result<()> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
// Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_packet(pkt: &[u8], from: SocketAddr) -> Result<()> {
|
async fn handle_packet(pkt: &[u8], _: SocketAddr) -> Result<()> {
|
||||||
let common = packet::Common::from_slice(pkt)?;
|
let common = packet::Common::from_slice(pkt)?;
|
||||||
println!("common: {:?}", common);
|
println!("common: {:?}", common);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@ -19,7 +19,7 @@ use once_cell::sync::OnceCell;
|
|||||||
static SN: OnceCell<SuperNode> = OnceCell::new();
|
static SN: OnceCell<SuperNode> = OnceCell::new();
|
||||||
|
|
||||||
pub fn init_supernode(sn: SuperNode) -> Result<()> {
|
pub fn init_supernode(sn: SuperNode) -> Result<()> {
|
||||||
if let Err(e) = SN.set(sn) {
|
if let Err(_) = SN.set(sn) {
|
||||||
return Err(SDLanError::NormalError("initialize sn error"));
|
return Err(SDLanError::NormalError("initialize sn error"));
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user