Skip to content

Commit

Permalink
Resolve warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
KOBA789 committed Apr 19, 2024
1 parent be3ca97 commit 89375e8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions gaia-ccsds-c2a/src/ccsds/aos/m_pdu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ mod tests {
bytes
};
defrag.push(&m_pdu1).unwrap();
let packet = defrag.read().unwrap();
let packet = defrag.read_as_bytes_and_packet().unwrap().1;
assert_eq!(1, packet.packet_data.len());
assert_eq!(0xDE, packet.packet_data[0]);
let size = packet.packet_size().unwrap();
assert_eq!(defrag.advance(), size);
assert!(defrag.read().is_none());
assert!(defrag.read_as_bytes_and_packet().is_none());
}
}
2 changes: 1 addition & 1 deletion gaia-ccsds-c2a/src/ccsds_c2a/aos/virual_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ pub struct Demuxer {

impl Demuxer {
pub fn demux(&mut self, vcid: u8) -> &mut VirtualChannel {
self.channels.entry(vcid).or_insert_with(Default::default)
self.channels.entry(vcid).or_default()
}
}
4 changes: 2 additions & 2 deletions gaia-tmtc/src/recorder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ impl Hook<Arc<Tco>> for RecordHook {
async fn hook(&mut self, tco: Arc<Tco>) -> Result<Self::Output> {
let now = chrono::Utc::now().naive_utc();
let timestamp = Timestamp {
seconds: now.timestamp(),
nanos: now.timestamp_subsec_nanos() as i32,
seconds: now.and_utc().timestamp(),
nanos: now.and_utc().timestamp_subsec_nanos() as i32,
};
self.recorder_client
.post_command(PostCommandRequest {
Expand Down
2 changes: 1 addition & 1 deletion tmtc-c2a/src/kble_gs.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use anyhow::{anyhow, ensure, Result};
use futures::{future, SinkExt, TryStreamExt};
use futures::{SinkExt, TryStreamExt};
use gaia_ccsds_c2a::{
ccsds::{
aos,
Expand Down
2 changes: 1 addition & 1 deletion tmtc-c2a/src/registry/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl Registry {
data_type: data_type.into(),
}
})
.chain(trailer_parameter.into_iter())
.chain(trailer_parameter)
.collect();
let command_name = command_name.to_string();
let command_schema = proto::CommandSchema {
Expand Down

0 comments on commit 89375e8

Please sign in to comment.