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

Method as_mut_slice

crates/wtf8/src/lib.rs:383–388  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

381
382 #[inline]
383 pub fn as_mut_slice(&mut self) -> &mut Wtf8 {
384 // Safety: `Wtf8` doesn't expose any way to mutate the bytes that would
385 // cause them to change from well-formed UTF-8 to ill-formed UTF-8,
386 // which would break the assumptions of the `is_known_utf8` field.
387 unsafe { Wtf8::from_mut_bytes_unchecked(&mut self.bytes) }
388 }
389
390 /// Reserves capacity for at least `additional` more bytes to be inserted
391 /// in the given `Wtf8Buf`.

Callers 11

readMethod · 0.45
write_pending_tlsMethod · 0.45
ssl_do_handshakeFunction · 0.45
hex_impl_no_sepFunction · 0.45
buffer.rsFile · 0.45
_io.rsFile · 0.45
base.rsFile · 0.45
capitalizeMethod · 0.45
do_slice_reverseMethod · 0.45
bytearray.rsFile · 0.45
deref_mutMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected