(
name: InodeAttrName,
events: &[InodeAttrEvent],
projection: &mut InodeAttributeProjection,
apply: impl FnOnce(&mut InodeMaterialization, InodeAttr),
)
| 155 | } |
| 156 | |
| 157 | fn project_register( |
| 158 | name: InodeAttrName, |
| 159 | events: &[InodeAttrEvent], |
| 160 | projection: &mut InodeAttributeProjection, |
| 161 | apply: impl FnOnce(&mut InodeMaterialization, InodeAttr), |
| 162 | ) { |
| 163 | match events { |
| 164 | [] => {} |
| 165 | [event] => apply(&mut projection.materialization, event.value), |
| 166 | events => projection.conflicts.push(InodeAttributeConflict { |
| 167 | name, |
| 168 | events: events.to_vec(), |
| 169 | }), |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | #[cfg(test)] |
| 174 | mod tests { |
no test coverage detected