aboutsummaryrefslogtreecommitdiffstats
path: root/src/wireguard/handshake
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2021-01-13 18:10:04 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2021-01-13 18:10:52 +0100
commit7d84ef9064559a29b23ab86036f7ef62b450f90c (patch)
tree9a849e0b80218125b007420d7d472665b1619c4e /src/wireguard/handshake
parentUpgrade dependencies (diff)
downloadwireguard-rs-master.tar.xz
wireguard-rs-master.zip
Allows for erroneous Clippy lintsHEADmaster
Signed-off-by: Mathias Hall-Andersen <mathias@hall-andersen.dk>
Diffstat (limited to 'src/wireguard/handshake')
-rw-r--r--src/wireguard/handshake/macs.rs1
-rw-r--r--src/wireguard/handshake/ratelimiter.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/wireguard/handshake/macs.rs b/src/wireguard/handshake/macs.rs
index 8d79c5e..f4f5586 100644
--- a/src/wireguard/handshake/macs.rs
+++ b/src/wireguard/handshake/macs.rs
@@ -141,6 +141,7 @@ impl Generator {
pub fn process(&mut self, reply: &CookieReply) -> Result<(), HandshakeError> {
let mac1 = self.last_mac1.ok_or(HandshakeError::InvalidState)?;
let mut tau = [0u8; SIZE_COOKIE];
+ #[allow(clippy::unnecessary_mut_passed)]
XOPEN!(
&self.cookie_key, // key
&reply.f_nonce, // nonce
diff --git a/src/wireguard/handshake/ratelimiter.rs b/src/wireguard/handshake/ratelimiter.rs
index f6210fc..9e796a0 100644
--- a/src/wireguard/handshake/ratelimiter.rs
+++ b/src/wireguard/handshake/ratelimiter.rs
@@ -37,6 +37,7 @@ impl Drop for RateLimiter {
impl RateLimiter {
pub fn new() -> Self {
+ #[allow(clippy::mutex_atomic)]
RateLimiter(Arc::new(RateLimiterInner {
gc_dropped: (Mutex::new(false), Condvar::new()),
gc_running: AtomicBool::from(false),
@@ -143,7 +144,7 @@ mod tests {
expected.push(Result {
allowed: true,
wait: Duration::new(0, 0),
- text: "inital burst",
+ text: "initial burst",
});
}