fix: add tokio time feature, make SendState/RecvState::new public
- tokio 'time' feature needed for tokio::time::interval in retransmit timer - SendState::new and RecvState::new must be pub for use from main.rs - prefix unused tx param with underscore
This commit is contained in:
@@ -33,7 +33,7 @@ pub struct RecvState {
|
||||
}
|
||||
|
||||
impl SendState {
|
||||
fn new() -> Self {
|
||||
pub fn new() -> Self {
|
||||
SendState {
|
||||
send_seq: 0,
|
||||
acked_seq: 0,
|
||||
@@ -83,7 +83,7 @@ impl SendState {
|
||||
}
|
||||
|
||||
impl RecvState {
|
||||
fn new() -> Self {
|
||||
pub fn new() -> Self {
|
||||
RecvState {
|
||||
expected_seq: 0,
|
||||
deliver_seq: 0,
|
||||
@@ -155,7 +155,7 @@ pub async fn handle_data(
|
||||
seq: u32,
|
||||
ack_seq: u32,
|
||||
payload: &[u8],
|
||||
tx: &TxChan,
|
||||
_tx: &TxChan,
|
||||
) -> Result<bool, WriteError> {
|
||||
let handle = {
|
||||
let store = store.lock().expect("store lock poisoned");
|
||||
|
||||
Reference in New Issue
Block a user