Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ to_string
Method
to_string
crates/literal/src/escape.rs:128–132 ·
view source on GitHub ↗
(&self)
Source
from the content-addressed store, hash-verified
126
}
127
128
pub fn to_string(&self) -> Option<String> {
129
let mut s = String::with_capacity(self.0.layout().len?);
130
self.write(&mut s).unwrap();
131
Some(s)
132
}
133
}
134
135
impl core::fmt::Display for StrRepr<
'_, '
_> {
Callers
15
eval
Function · 0.80
bench_rustpython_code
Function · 0.80
criterion_benchmark
Function · 0.80
bench_rustpython_code
Function · 0.80
run_file
Function · 0.80
main
Function · 0.80
parse_python_file
Function · 0.80
panic_hook
Function · 0.80
inject_module
Method · 0.80
inject_js_module
Method · 0.80
py_err_to_js_err
Function · 0.80
js_py_typeerror
Function · 0.80
Calls
4
Some
Class · 0.50
layout
Method · 0.45
unwrap
Method · 0.45
write
Method · 0.45
Tested by
1
test_fstring_adjacent_literals_are_merged
Function · 0.64