konst/iter/
iterator_adaptors.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// Const analog of [`core::iter::repeat`],
/// except that this requires the repeated value to impl `Copy`
/// (instead of `Clone`).
///
/// # Example
///
/// ```rust
/// use konst::iter::{self, collect_const};
///
/// const ARR: &[u8] = &collect_const!(u8 => iter::repeat(3),take(5));
///
/// assert_eq!(ARR, &[3, 3, 3, 3, 3]);
/// ```
pub use konst_kernel::iter::iter_adaptors::repeat;

/// Const analog of [`core::iter::Repeat`],
/// constructed by [`repeat`](crate::iter::repeat).
pub use konst_kernel::iter::iter_adaptors::Repeat;