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

Method into_wtf8

crates/vm/src/builtins/str.rs:2185–2187  ·  view source on GitHub ↗

Convert to PyStrRef. Safe because PyUtf8Str is a subtype of PyStr.

(self)

Source from the content-addressed store, hash-verified

2183impl PyRef<PyUtf8Str> {
2184 /// Convert to PyStrRef. Safe because PyUtf8Str is a subtype of PyStr.
2185 pub fn into_wtf8(self) -> PyStrRef {
2186 unsafe { mem::transmute::<Self, PyStrRef>(self) }
2187 }
2188}
2189
2190impl From<PyRef<PyUtf8Str>> for PyRef<PyStr> {

Callers 11

get_addrFunction · 0.80
parseMethod · 0.80
parse_objectMethod · 0.80
call_scan_onceMethod · 0.80
make_decode_errorMethod · 0.80
get_frozen_objectFunction · 0.80
find_coderMethod · 0.80
fromMethod · 0.80
new_heapMethod · 0.80
__name__Method · 0.80
slot_newMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected