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

Method write_source

crates/literal/src/escape.rs:264–269  ·  view source on GitHub ↗
(&self, formatter: &mut impl core::fmt::Write)

Source from the content-addressed store, hash-verified

262 }
263
264 unsafe fn write_source(&self, formatter: &mut impl core::fmt::Write) -> core::fmt::Result {
265 formatter.write_str(unsafe {
266 // SAFETY: this function must be called only when source is printable characters (i.e. no surrogates)
267 core::str::from_utf8_unchecked(self.source.as_bytes())
268 })
269 }
270
271 #[cold]
272 fn write_body_slow(&self, formatter: &mut impl core::fmt::Write) -> core::fmt::Result {

Callers 1

write_bodyMethod · 0.80

Calls 2

write_strMethod · 0.45
as_bytesMethod · 0.45

Tested by

no test coverage detected