clippy fix
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
all: check build embedded test clippy check-fmt docs coverage
|
||||
all: check build clippy embedded test check-fmt docs coverage
|
||||
|
||||
clippy:
|
||||
cargo clippy -- -D warnings
|
||||
|
||||
+1
-1
@@ -452,7 +452,7 @@ impl CucTime {
|
||||
.ok_or(CucError::LeapSecondCorrectionError)?;
|
||||
let fractions =
|
||||
fractional_part_from_subsec_ns(res, unix_time.subsec_millis() as u64 * 10_u64.pow(6));
|
||||
Self::new_generic(WidthCounterPair(4, counter as u32), fractions)
|
||||
Self::new_generic(WidthCounterPair(4, counter), fractions)
|
||||
}
|
||||
|
||||
/// Most generic constructor which allows full configurability for the counter and for the
|
||||
|
||||
+1
-3
@@ -255,10 +255,8 @@ impl PrimaryHeader {
|
||||
| ((self.protocol_control_command_flag as u8) << 6)
|
||||
| ((self.ocf_flag as u8) << 3)
|
||||
| self.vc_frame_count_len.as_u8();
|
||||
let mut packet_idx = 7;
|
||||
for idx in (0..self.vc_frame_count_len.value()).rev() {
|
||||
for (packet_idx, idx) in (7..).zip((0..self.vc_frame_count_len.value()).rev()) {
|
||||
buf[packet_idx] = ((self.vc_frame_count >> (idx * 8)) & 0xff) as u8;
|
||||
packet_idx += 1;
|
||||
}
|
||||
Ok(self.len_header())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user