Remove some warnings
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
This commit is contained in:
parent
866edc2d7d
commit
376e8fb833
|
@ -133,8 +133,6 @@ pub(crate) struct AuthNeededInfo {
|
||||||
pub handshake: Handshake,
|
pub handshake: Handshake,
|
||||||
/// hkdf generated from the handshake
|
/// hkdf generated from the handshake
|
||||||
pub hkdf: Hkdf,
|
pub hkdf: Hkdf,
|
||||||
/// cipher to be used in both directions
|
|
||||||
pub cipher: CipherKind,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Client information needed to fully establish the conenction
|
/// Client information needed to fully establish the conenction
|
||||||
|
@ -336,12 +334,9 @@ impl HandshakeTracker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let cipher = req.cipher;
|
|
||||||
|
|
||||||
return Ok(HandshakeAction::AuthNeeded(AuthNeededInfo {
|
return Ok(HandshakeAction::AuthNeeded(AuthNeededInfo {
|
||||||
handshake,
|
handshake,
|
||||||
hkdf,
|
hkdf,
|
||||||
cipher,
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
DirSync::Resp(resp) => {
|
DirSync::Resp(resp) => {
|
||||||
|
|
|
@ -530,7 +530,7 @@ impl Record {
|
||||||
bytes_parsed = bytes_parsed + pubkey_length;
|
bytes_parsed = bytes_parsed + pubkey_length;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(_) => {
|
||||||
return Err(Error::UnsupportedData(bytes_parsed));
|
return Err(Error::UnsupportedData(bytes_parsed));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -125,7 +125,7 @@ impl HkdfSha3 {
|
||||||
let mut out: [u8; 32] = [0; 32];
|
let mut out: [u8; 32] = [0; 32];
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
unsafe {
|
unsafe {
|
||||||
self.inner.hkdf.expand(context, &mut out);
|
let _ = self.inner.hkdf.expand(context, &mut out);
|
||||||
}
|
}
|
||||||
out.into()
|
out.into()
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ impl Random {
|
||||||
}
|
}
|
||||||
/// Fill a buffer with randomness
|
/// Fill a buffer with randomness
|
||||||
pub fn fill(&self, out: &mut [u8]) {
|
pub fn fill(&self, out: &mut [u8]) {
|
||||||
self.rnd.fill(out);
|
let _ = self.rnd.fill(out);
|
||||||
}
|
}
|
||||||
/// return the underlying ring SystemRandom
|
/// return the underlying ring SystemRandom
|
||||||
pub fn ring_rnd(&self) -> &::ring::rand::SystemRandom {
|
pub fn ring_rnd(&self) -> &::ring::rand::SystemRandom {
|
||||||
|
|
|
@ -52,9 +52,6 @@ pub(crate) enum Work {
|
||||||
DropHandshake(KeyID),
|
DropHandshake(KeyID),
|
||||||
Recv(RawUdp),
|
Recv(RawUdp),
|
||||||
}
|
}
|
||||||
pub(crate) enum WorkAnswer {
|
|
||||||
UNUSED,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Actual worker implementation.
|
/// Actual worker implementation.
|
||||||
#[allow(missing_debug_implementations)]
|
#[allow(missing_debug_implementations)]
|
||||||
|
@ -653,6 +650,6 @@ impl Worker {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let res = src_sock.send_to(&data, client.0).await;
|
let _res = src_sock.send_to(&data, client.0).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -449,7 +449,7 @@ impl Fenrir {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// and tell that thread to connect somewhere
|
// 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]
|
let _ = self._thread_work[thread_idx]
|
||||||
.send(Work::Connect(ConnectInfo {
|
.send(Work::Connect(ConnectInfo {
|
||||||
answer: send,
|
answer: send,
|
||||||
|
|
Loading…
Reference in New Issue