Add function and prefer .iter()

This commit is contained in:
Tobias Reisinger 2022-07-17 20:19:36 +02:00
parent 53c6fcd917
commit e3adc35221
12 changed files with 117 additions and 67 deletions

3
src/utils.rs Normal file
View file

@ -0,0 +1,3 @@
pub fn vec_has_error<T, E>(target: &[Result<T, E>]) -> bool {
target.iter().any(|t| t.is_err())
}