From 4555aa4bf72caad5d6b850ecbd439d466321b80c Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Mon, 31 Dec 2018 12:36:06 -0800 Subject: [PATCH] Cosmetic fixes --- quinn-proto/src/crypto.rs | 4 ++-- quinn-proto/src/stream.rs | 2 +- quinn/src/lib.rs | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/quinn-proto/src/crypto.rs b/quinn-proto/src/crypto.rs index 3122ad01b..5cd01fe3c 100644 --- a/quinn-proto/src/crypto.rs +++ b/quinn-proto/src/crypto.rs @@ -350,14 +350,14 @@ impl HeaderKey { use self::HeaderKey::*; match self { AesEcb128(key) => { - let mut cipher = Ecb::::new_var(key, &[]).unwrap(); + let cipher = Ecb::::new_var(key, &[]).unwrap(); let mut buf = [0; 16]; buf.copy_from_slice(sample); cipher.encrypt(&mut buf, 16).unwrap(); [buf[0], buf[1], buf[2], buf[3], buf[4]] } AesEcb256(key) => { - let mut cipher = Ecb::::new_var(key, &[]).unwrap(); + let cipher = Ecb::::new_var(key, &[]).unwrap(); let mut buf = [0; 16]; buf.copy_from_slice(sample); cipher.encrypt(&mut buf, 16).unwrap(); diff --git a/quinn-proto/src/stream.rs b/quinn-proto/src/stream.rs index 669f9d754..910627721 100644 --- a/quinn-proto/src/stream.rs +++ b/quinn-proto/src/stream.rs @@ -319,7 +319,7 @@ impl Assembler { } } - /// Whether `peek` will return at least one nonempty slice + /// Whether `read` will return nonzero pub fn blocked(&self) -> bool { let mask = !0 >> self.written_offset; self.written.front().map_or(true, |x| x & mask == mask) diff --git a/quinn/src/lib.rs b/quinn/src/lib.rs index 9202d25b7..2a1d09224 100644 --- a/quinn/src/lib.rs +++ b/quinn/src/lib.rs @@ -1039,7 +1039,6 @@ impl Connection { .inner .connection(self.0.conn) .remote() - .into() } /// The `ConnectionId`s defined for `conn` locally.