Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Resolve warnings #152

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading