From e4d8c0c9a790865103f3113d3316dfd161d6f1fe Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 18 Sep 2023 16:08:35 +0200 Subject: [PATCH] cargo fmt --- satrs-core/src/hal/std/tcp_with_cobs_server.rs | 9 ++++++--- satrs-core/src/parsers.rs | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) 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..]);