Cosmetic fixes

This commit is contained in:
Benjamin Saunders
2018-12-31 12:36:06 -08:00
committed by Dirkjan Ochtman
parent 4d8260b57e
commit 4555aa4bf7
3 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -350,14 +350,14 @@ impl HeaderKey {
use self::HeaderKey::*;
match self {
AesEcb128(key) => {
let mut cipher = Ecb::<Aes128, ZeroPadding>::new_var(key, &[]).unwrap();
let cipher = Ecb::<Aes128, ZeroPadding>::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::<Aes256, ZeroPadding>::new_var(key, &[]).unwrap();
let cipher = Ecb::<Aes256, ZeroPadding>::new_var(key, &[]).unwrap();
let mut buf = [0; 16];
buf.copy_from_slice(sample);
cipher.encrypt(&mut buf, 16).unwrap();
+1 -1
View File
@@ -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)
-1
View File
@@ -1039,7 +1039,6 @@ impl Connection {
.inner
.connection(self.0.conn)
.remote()
.into()
}
/// The `ConnectionId`s defined for `conn` locally.