Merge pull request 'formatting' (#168) from fmt into main
All checks were successful
Rust/sat-rs/pipeline/head This commit looks good

Reviewed-on: #168
This commit is contained in:
Robin Müller 2024-04-22 15:47:58 +02:00
commit 701db659e9

View File

@ -203,12 +203,8 @@ mod tests {
.expect("writing packet failed"); .expect("writing packet failed");
let tc_cacher = TcCacher::default(); let tc_cacher = TcCacher::default();
let verificator = SimpleVerificator::new_with_second_id(); let verificator = SimpleVerificator::new_with_second_id();
let parse_result = parse_buffer_for_ccsds_space_packets( let parse_result =
&buffer, parse_buffer_for_ccsds_space_packets(&buffer, &verificator, PARSER_ID, &tc_cacher);
&verificator,
PARSER_ID,
&tc_cacher,
);
assert!(parse_result.is_ok()); assert!(parse_result.is_ok());
let parse_result = parse_result.unwrap(); let parse_result = parse_result.unwrap();
assert_eq!(parse_result.packets_found, 2); assert_eq!(parse_result.packets_found, 2);
@ -251,7 +247,6 @@ mod tests {
let incomplete_tail_idx = parse_result.incomplete_tail_start.unwrap(); let incomplete_tail_idx = parse_result.incomplete_tail_start.unwrap();
assert_eq!(incomplete_tail_idx, packet_len_ping); assert_eq!(incomplete_tail_idx, packet_len_ping);
let queue = tc_cacher.tc_queue.borrow(); let queue = tc_cacher.tc_queue.borrow();
assert_eq!(queue.len(), 1); assert_eq!(queue.len(), 1);
// The broken packet was moved to the start, so the next write index should be after the // The broken packet was moved to the start, so the next write index should be after the
@ -295,12 +290,8 @@ mod tests {
.expect("writing failed"); .expect("writing failed");
let verificator = SimpleVerificator::default(); let verificator = SimpleVerificator::default();
let tc_cacher = TcCacher::default(); let tc_cacher = TcCacher::default();
let parse_result = parse_buffer_for_ccsds_space_packets( let parse_result =
&buf, parse_buffer_for_ccsds_space_packets(&buf, &verificator, PARSER_ID, &tc_cacher);
&verificator,
PARSER_ID,
&tc_cacher,
);
assert!(parse_result.is_ok()); assert!(parse_result.is_ok());
let parse_result = parse_result.unwrap(); let parse_result = parse_result.unwrap();
assert_eq!(parse_result.packets_found, 1); assert_eq!(parse_result.packets_found, 1);