diff --git a/src/backup/catalog.rs b/src/backup/catalog.rs index b686fd5f..4c72ba3a 100644 --- a/src/backup/catalog.rs +++ b/src/backup/catalog.rs @@ -605,7 +605,7 @@ pub fn catalog_encode_i64(writer: &mut W, v: i64) -> Result<(), Error> break; } enc.push((128 | (d & 127)) as u8); - d = d >> 7; + d >>= 7; } writer.write_all(&enc)?; @@ -659,7 +659,7 @@ pub fn catalog_encode_u64(writer: &mut W, v: u64) -> Result<(), Error> break; } enc.push((128 | (d & 127)) as u8); - d = d >> 7; + d >>= 7; } writer.write_all(&enc)?; diff --git a/src/tape/drive/volume_statistics.rs b/src/tape/drive/volume_statistics.rs index cf84ea9c..5657d3ef 100644 --- a/src/tape/drive/volume_statistics.rs +++ b/src/tape/drive/volume_statistics.rs @@ -105,8 +105,8 @@ fn decode_volume_statistics(data: &[u8]) -> Result let mut value: u64 = 0; for i in 0..len { - value = value << 8; - value = value | buffer[i] as u64; + value <<= 8; + value |= buffer[i] as u64; } Ok(value) diff --git a/src/tape/helpers/blocked_writer.rs b/src/tape/helpers/blocked_writer.rs index c51beedc..961b2ed2 100644 --- a/src/tape/helpers/blocked_writer.rs +++ b/src/tape/helpers/blocked_writer.rs @@ -77,7 +77,7 @@ impl BlockedWriter { self.bytes_written += BlockHeader::SIZE; } else { - self.buffer_pos = self.buffer_pos + bytes; + self.buffer_pos += bytes; } Ok(bytes) diff --git a/src/tools/systemd/parse_time.rs b/src/tools/systemd/parse_time.rs index a03b078b..88f5c92d 100644 --- a/src/tools/systemd/parse_time.rs +++ b/src/tools/systemd/parse_time.rs @@ -120,7 +120,7 @@ fn parse_weekdays_range(i: &str) -> IResult<&str, WeekDays> { loop { res |= pos; if pos >= end { break; } - pos = pos << 1; + pos <<= 1; } WeekDays::from_bits(res).unwrap() };