Skip to content

Commit 4a8e1b1

Browse files
committed
chore: fix ci
1 parent 0f3f2f7 commit 4a8e1b1

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lazer/sdk/rust/protocol/src/time.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,9 @@ impl TryFrom<&ProtobufTimestamp> for TimestampUs {
209209

210210
impl 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 {
456454
impl 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

Comments
 (0)