Remove some warnings

Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
This commit is contained in:
Luca Fulchir 2023-06-17 14:06:57 +02:00
parent 866edc2d7d
commit 376e8fb833
Signed by: luca.fulchir
GPG Key ID: 8F6440603D13A78E
6 changed files with 5 additions and 13 deletions

View File

@ -133,8 +133,6 @@ pub(crate) struct AuthNeededInfo {
pub handshake: Handshake,
/// hkdf generated from the handshake
pub hkdf: Hkdf,
/// cipher to be used in both directions
pub cipher: CipherKind,
}
/// Client information needed to fully establish the conenction
@ -336,12 +334,9 @@ impl HandshakeTracker {
}
}
let cipher = req.cipher;
return Ok(HandshakeAction::AuthNeeded(AuthNeededInfo {
handshake,
hkdf,
cipher,
}));
}
DirSync::Resp(resp) => {

View File

@ -530,7 +530,7 @@ impl Record {
bytes_parsed = bytes_parsed + pubkey_length;
continue;
}
Err(e) => {
Err(_) => {
return Err(Error::UnsupportedData(bytes_parsed));
}
};

View File

@ -125,7 +125,7 @@ impl HkdfSha3 {
let mut out: [u8; 32] = [0; 32];
#[allow(unsafe_code)]
unsafe {
self.inner.hkdf.expand(context, &mut out);
let _ = self.inner.hkdf.expand(context, &mut out);
}
out.into()
}

View File

@ -27,7 +27,7 @@ impl Random {
}
/// Fill a buffer with randomness
pub fn fill(&self, out: &mut [u8]) {
self.rnd.fill(out);
let _ = self.rnd.fill(out);
}
/// return the underlying ring SystemRandom
pub fn ring_rnd(&self) -> &::ring::rand::SystemRandom {

View File

@ -52,9 +52,6 @@ pub(crate) enum Work {
DropHandshake(KeyID),
Recv(RawUdp),
}
pub(crate) enum WorkAnswer {
UNUSED,
}
/// Actual worker implementation.
#[allow(missing_debug_implementations)]
@ -653,6 +650,6 @@ impl Worker {
return;
}
};
let res = src_sock.send_to(&data, client.0).await;
let _res = src_sock.send_to(&data, client.0).await;
}
}

View File

@ -449,7 +449,7 @@ impl Fenrir {
.unwrap();
// and tell that thread to connect somewhere
let (send, mut recv) = ::tokio::sync::oneshot::channel();
let (send, recv) = ::tokio::sync::oneshot::channel();
let _ = self._thread_work[thread_idx]
.send(Work::Connect(ConnectInfo {
answer: send,