Skip to content

Commit 5da250a

Browse files
refactor: use array_windows for timing interval calculation
Replace .windows(2) with .array_windows() and destructure into [a, b] for clearer, type-safe access (Rust 1.94).
1 parent 06e5b63 commit 5da250a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bot/timing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ impl RequestHistory {
9292
}
9393

9494
self.timestamps
95-
.windows(2)
96-
.map(|w| w[1].duration_since(w[0]))
95+
.array_windows()
96+
.map(|[a, b]| b.duration_since(*a))
9797
.collect()
9898
}
9999
}

0 commit comments

Comments
 (0)