mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-21 02:33:23 +00:00
Cosmetic fixes
This commit is contained in:
committed by
Dirkjan Ochtman
parent
4d8260b57e
commit
4555aa4bf7
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1039,7 +1039,6 @@ impl Connection {
|
||||
.inner
|
||||
.connection(self.0.conn)
|
||||
.remote()
|
||||
.into()
|
||||
}
|
||||
|
||||
/// The `ConnectionId`s defined for `conn` locally.
|
||||
|
||||
Reference in New Issue
Block a user