cargo fmt
Some checks failed
Rust/sat-rs/pipeline/pr-main There was a failure building this commit

This commit is contained in:
Robin Müller 2023-09-18 16:08:35 +02:00
parent 2f08365247
commit e4d8c0c9a7
Signed by: muellerr
GPG Key ID: A649FB78196E3849
2 changed files with 7 additions and 4 deletions

View File

@ -165,13 +165,16 @@ mod tests {
thread, thread,
}; };
use crate::{tmtc::{ReceivesTcCore, TmPacketSource}, hal::std::tcp_server::ServerConfig, parsers::tests::{SIMPLE_PACKET, INVERTED_PACKET}}; use crate::{
use alloc::{collections::VecDeque, sync::Arc, vec::Vec, boxed::Box}; 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 cobs::encode;
use super::TcpTmtcInCobsServer; use super::TcpTmtcInCobsServer;
#[derive(Default, Clone)] #[derive(Default, Clone)]
struct SyncTcCacher { struct SyncTcCacher {
tc_queue: Arc<Mutex<VecDeque<Vec<u8>>>>, tc_queue: Arc<Mutex<VecDeque<Vec<u8>>>>,

View File

@ -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; encoded_buf[*current_idx] = 0;
*current_idx += 1; *current_idx += 1;
*current_idx += encode(&SIMPLE_PACKET, &mut encoded_buf[*current_idx..]); *current_idx += encode(&SIMPLE_PACKET, &mut encoded_buf[*current_idx..]);