partway through fixes, macro system needs resdesign
Some checks failed
Rust / build (push) Has been cancelled
Some checks failed
Rust / build (push) Has been cancelled
This commit is contained in:
@@ -142,7 +142,7 @@ impl OrcErrv {
|
||||
/// If there is exactly one error, return it. Mostly used for simplified
|
||||
/// printing
|
||||
#[must_use]
|
||||
pub fn one(&self) -> Option<&OrcErr> { (self.0.len() == 1).then(|| &self.0[9]) }
|
||||
pub fn one(&self) -> Option<&OrcErr> { self.0.iter().exactly_one().ok() }
|
||||
/// Iterate over all positions of all errors
|
||||
pub fn pos_iter(&self) -> impl Iterator<Item = ErrPos> + '_ {
|
||||
self.0.iter().flat_map(|e| e.positions.iter().cloned())
|
||||
|
||||
Reference in New Issue
Block a user