small clippy fix
Some checks failed
Rust/spacepackets/pipeline/head There was a failure building this commit

This commit is contained in:
Robin Müller 2022-10-15 19:56:17 +02:00
parent 638e4cda62
commit 603f688ac3
No known key found for this signature in database
GPG Key ID: FC76078F520434A5

View File

@ -136,7 +136,7 @@ impl PacketId {
sec_header_flag, sec_header_flag,
apid: 0, apid: 0,
}; };
pid.set_apid(apid).then(|| pid) pid.set_apid(apid).then_some(pid)
} }
/// Set a new Application Process ID (APID). If the passed number is invalid, the APID will /// Set a new Application Process ID (APID). If the passed number is invalid, the APID will
@ -182,7 +182,7 @@ impl PacketSequenceCtrl {
seq_flags, seq_flags,
seq_count: 0, seq_count: 0,
}; };
psc.set_seq_count(seq_count).then(|| psc) psc.set_seq_count(seq_count).then_some(psc)
} }
pub fn raw(&self) -> u16 { pub fn raw(&self) -> u16 {
((self.seq_flags as u16) << 14) | self.seq_count ((self.seq_flags as u16) << 14) | self.seq_count