(&self, mut opt: WriteOpt)
| 182 | |
| 183 | impl<T: WriteSource> SeparatedExprs<'_, T> { |
| 184 | fn write_inline(&self, mut opt: WriteOpt) -> Option<String> { |
| 185 | let mut exprs = Vec::new(); |
| 186 | for expr in self.exprs { |
| 187 | let expr = expr.write(opt.clone())?; |
| 188 | |
| 189 | if expr.contains('\n') { |
| 190 | return None; |
| 191 | } |
| 192 | opt.consume_width(expr.len() as u16)?; |
| 193 | |
| 194 | exprs.push(expr); |
| 195 | } |
| 196 | |
| 197 | let separators = self.inline.len() * exprs.len().saturating_sub(1); |
| 198 | opt.consume_width(separators as u16)?; |
| 199 | |
| 200 | Some(exprs.join(self.inline)) |
| 201 | } |
| 202 | } |
no test coverage detected