refactor(proto): Remove unused protocol flags and helper functions
This commit is contained in:
1 parent
a5e8c80ecb
commit
04ebaf829a
2 files changed
+3
-11
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
flags::{has, FLAG_CLOSE, FLAG_HMAC, FLAG_OPEN, FLAG_REPLY},
|
flags::{has, FLAG_HMAC, FLAG_OPEN, FLAG_REPLY},
|
||||||
hmac,
|
hmac,
|
||||||
layout::{echo_packet_len, PacketLayout},
|
layout::{echo_packet_len, PacketLayout},
|
||||||
open::{check_hmac_presence, reject},
|
open::{check_hmac_presence, reject},
|
||||||
@@ -147,11 +147,6 @@ fn read_i64(packet: &[u8], pos: &mut usize) -> i64 {
|
|||||||
value
|
value
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
fn _assert_close_flag_imported(_: u8) {
|
|
||||||
let _ = FLAG_CLOSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
params::{Clock, Params, StampAt},
|
params::{Params, StampAt},
|
||||||
HEADER_SIZE, HMAC_SIZE, RECV_COUNT_SIZE, RECV_WINDOW_SIZE, SEQ_SIZE, TIMESTAMP_SIZE,
|
HEADER_SIZE, HMAC_SIZE, RECV_COUNT_SIZE, RECV_WINDOW_SIZE, SEQ_SIZE, TIMESTAMP_SIZE,
|
||||||
TOKEN_SIZE,
|
TOKEN_SIZE,
|
||||||
};
|
};
|
||||||
@@ -117,13 +117,10 @@ pub fn echo_packet_len(hmac: bool, params: &Params) -> usize {
|
|||||||
header_len.max(requested)
|
header_len.max(requested)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
fn _assert_clock_is_used(_: Clock) {}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::params::{ReceivedStats, StampAt};
|
use crate::params::{Clock, ReceivedStats, StampAt};
|
||||||
|
|
||||||
fn params(stats: ReceivedStats, stamp_at: StampAt, clock: Clock) -> Params {
|
fn params(stats: ReceivedStats, stamp_at: StampAt, clock: Clock) -> Params {
|
||||||
Params {
|
Params {
|
||||||
|
|||||||
Reference in new issue
Block a user