MCPcopy Index your code
hub / github.com/RustPython/RustPython / unparse_tstring

Method unparse_tstring

crates/codegen/src/unparse.rs:642–653  ·  view source on GitHub ↗
(&mut self, value: &ast::TStringValue)

Source from the content-addressed store, hash-verified

640 }
641
642 fn unparse_tstring(&mut self, value: &ast::TStringValue) -> fmt::Result {
643 self.p("t")?;
644 let body = fmt::from_fn(|f| {
645 value.iter().try_for_each(|tstring| {
646 Unparser::new(f, self.source).unparse_fstring_body(&tstring.elements)
647 })
648 })
649 .to_string();
650 UnicodeEscape::new_repr(body.as_str().as_ref())
651 .str_repr()
652 .write(self.f)
653 }
654}
655
656pub struct UnparseExpr<'a> {

Callers 1

unparse_exprMethod · 0.80

Calls 9

newFunction · 0.85
to_stringMethod · 0.80
unparse_fstring_bodyMethod · 0.80
str_reprMethod · 0.80
pMethod · 0.45
iterMethod · 0.45
writeMethod · 0.45
as_refMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected