Skip to content

Commit

Permalink
Make RcIter::new() const.
Browse files Browse the repository at this point in the history
  • Loading branch information
01mf02 committed Aug 17, 2024
1 parent ea18a19 commit efe8242
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jaq-interpret/src/rc_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ impl<T, I: Iterator<Item = T> + ?Sized> Iterator for &RcIter<I> {

impl<I> RcIter<I> {
/// Construct a new mutable iterator.
pub fn new(iter: I) -> Self {
Self(iter.into())
pub const fn new(iter: I) -> Self {
Self(core::cell::RefCell::new(iter))
}
}

0 comments on commit efe8242

Please sign in to comment.