(&mut self, elem: &ast::InterpolatedStringElement)
| 597 | } |
| 598 | |
| 599 | fn unparse_fstring_elem(&mut self, elem: &ast::InterpolatedStringElement) -> fmt::Result { |
| 600 | match elem { |
| 601 | ast::InterpolatedStringElement::Interpolation(ast::InterpolatedElement { |
| 602 | expression, |
| 603 | debug_text, |
| 604 | conversion, |
| 605 | format_spec, |
| 606 | .. |
| 607 | }) => self.unparse_formatted( |
| 608 | expression, |
| 609 | debug_text.as_ref(), |
| 610 | *conversion, |
| 611 | format_spec.as_deref(), |
| 612 | ), |
| 613 | ast::InterpolatedStringElement::Literal(ast::InterpolatedStringLiteralElement { |
| 614 | value, |
| 615 | .. |
| 616 | }) => self.unparse_fstring_str(value), |
| 617 | } |
| 618 | } |
| 619 | |
| 620 | fn unparse_fstring_str(&mut self, s: &str) -> fmt::Result { |
| 621 | let s = s.replace('{', "{{").replace('}', "}}"); |
no test coverage detected