Method
only_expr
(&self, mut expr: Vec<Expr>)
Source from the content-addressed store, hash-verified
| 1192 | /// Helper for [Self::with_new_exprs] to use when exactly one expression is expected. |
| 1193 | #[inline] |
| 1194 | fn only_expr(&self, mut expr: Vec<Expr>) -> Result<Expr> { |
| 1195 | assert_eq_or_internal_err!( |
| 1196 | expr.len(), |
| 1197 | 1, |
| 1198 | "{self:?} should have exactly one expr, got {:?}", |
| 1199 | &expr |
| 1200 | ); |
| 1201 | Ok(expr.remove(0)) |
| 1202 | } |
| 1203 | |
| 1204 | /// Helper for [Self::with_new_exprs] to use when exactly one input is expected. |
| 1205 | #[inline] |
Tested by
no test coverage detected