partway through fixes, macro system needs resdesign
Some checks failed
Rust / build (push) Has been cancelled

This commit is contained in:
2026-04-08 18:02:20 +02:00
parent 0909524dee
commit 9b4c7fa7d7
76 changed files with 1391 additions and 1065 deletions

View File

@@ -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())