Skip to content

Commit

Permalink
Rust 1.80: Use impl IntoIterator for Box<[T]>.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Jul 25, 2024
1 parent b87fe01 commit 2cb6bb0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion all-is-cubes-base/src/math/vol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,10 @@ impl<V, O> Vol<Box<[V]>, O> {
Vol {
bounds: self.bounds,
ordering: self.ordering,
contents: self.contents.into_vec().into_iter().map(f).collect(),
// When we switch to Rust 2024 edition, replace this qualified call with a method call.
contents: <Box<[V]> as IntoIterator>::into_iter(self.contents)
.map(f)
.collect(),
}
}
}
Expand Down

0 comments on commit 2cb6bb0

Please sign in to comment.