midi_toolkit/sequence/common/
wrap_ok.rs

1/// Wraps each item `T` into `Result<T, ()>`
2///
3/// Useful because all built in functions use Result as the item type for error handling
4pub fn wrap_ok<T, I: Iterator<Item = T> + Sized>(iter: I) -> impl Iterator<Item = Result<T, ()>> {
5    iter.map(|v| Ok(v))
6}