@@ -209,11 +209,9 @@ impl TryFrom<&ProtobufTimestamp> for TimestampUs {
209209
210210impl From < TimestampUs > for ProtobufTimestamp {
211211 fn from ( timestamp : TimestampUs ) -> Self {
212+ // u64 to i64 after this division can never overflow because the value cannot be too big
212213 ProtobufTimestamp {
213- #[ allow(
214- clippy:: cast_possible_wrap,
215- reason = "u64 to i64 after this division can never overflow because the value cannot be too big"
216- ) ]
214+ #[ allow( clippy:: cast_possible_wrap) ]
217215 seconds : ( timestamp. 0 / 1_000_000 ) as i64 ,
218216 // never fails, never overflows
219217 nanos : ( timestamp. 0 % 1_000_000 ) as i32 * 1000 ,
@@ -456,10 +454,8 @@ impl TryFrom<&ProtobufDuration> for DurationUs {
456454impl From < DurationUs > for ProtobufDuration {
457455 fn from ( duration : DurationUs ) -> Self {
458456 ProtobufDuration {
459- #[ allow(
460- clippy:: cast_possible_wrap,
461- reason = "u64 to i64 after this division can never overflow because the value cannot be too big"
462- ) ]
457+ // u64 to i64 after this division can never overflow because the value cannot be too big
458+ #[ allow( clippy:: cast_possible_wrap) ]
463459 seconds : ( duration. 0 / 1_000_000 ) as i64 ,
464460 // never fails, never overflows
465461 nanos : ( duration. 0 % 1_000_000 ) as i32 * 1000 ,
0 commit comments