diff --git a/satrs-core/src/hal/std/tcp_with_cobs_server.rs b/satrs-core/src/hal/std/tcp_with_cobs_server.rs index 559c7a2..31bf4d0 100644 --- a/satrs-core/src/hal/std/tcp_with_cobs_server.rs +++ b/satrs-core/src/hal/std/tcp_with_cobs_server.rs @@ -165,13 +165,16 @@ mod tests { thread, }; - use crate::{tmtc::{ReceivesTcCore, TmPacketSource}, hal::std::tcp_server::ServerConfig, parsers::tests::{SIMPLE_PACKET, INVERTED_PACKET}}; - use alloc::{collections::VecDeque, sync::Arc, vec::Vec, boxed::Box}; + use crate::{ + hal::std::tcp_server::ServerConfig, + parsers::tests::{INVERTED_PACKET, SIMPLE_PACKET}, + tmtc::{ReceivesTcCore, TmPacketSource}, + }; + use alloc::{boxed::Box, collections::VecDeque, sync::Arc, vec::Vec}; use cobs::encode; use super::TcpTmtcInCobsServer; - #[derive(Default, Clone)] struct SyncTcCacher { tc_queue: Arc>>>, diff --git a/satrs-core/src/parsers.rs b/satrs-core/src/parsers.rs index 41aeaa1..cfcd9b8 100644 --- a/satrs-core/src/parsers.rs +++ b/satrs-core/src/parsers.rs @@ -156,7 +156,7 @@ pub(crate) mod tests { } } - pub (crate) fn encode_simple_packet(encoded_buf: &mut [u8], current_idx: &mut usize) { + pub(crate) fn encode_simple_packet(encoded_buf: &mut [u8], current_idx: &mut usize) { encoded_buf[*current_idx] = 0; *current_idx += 1; *current_idx += encode(&SIMPLE_PACKET, &mut encoded_buf[*current_idx..]);