Skip to content

Commit c62abe2

Browse files
committed
clippy
1 parent b347bfb commit c62abe2

File tree

1 file changed

+5
-1
lines changed
  • turbopack/crates/turbo-tasks/src

1 file changed

+5
-1
lines changed

turbopack/crates/turbo-tasks/src/util.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,11 @@ pub struct IntoChunks<T> {
298298

299299
impl<T> IntoChunks<T> {
300300
pub fn len(&self) -> usize {
301-
(self.data.len() - self.index + self.chunk_size - 1) / self.chunk_size
301+
(self.data.len() - self.index).div_ceil(self.chunk_size)
302+
}
303+
304+
pub fn is_empty(&self) -> bool {
305+
self.index >= self.data.len()
302306
}
303307
}
304308

0 commit comments

Comments
 (0)