MCPcopy Create free account
hub / github.com/bnjbvr/trinity / string_lift

Function string_lift

modules/libcommand/src/trinity_module.rs:589–595  ·  view source on GitHub ↗
(bytes: Vec<u8>)

Source from the content-addressed store, hash-verified

587 }
588 pub use alloc_crate::vec::Vec;
589 pub unsafe fn string_lift(bytes: Vec<u8>) -> String {
590 if cfg!(debug_assertions) {
591 String::from_utf8(bytes).unwrap()
592 } else {
593 String::from_utf8_unchecked(bytes)
594 }
595 }
596 pub unsafe fn cabi_dealloc(ptr: *mut u8, size: usize, align: usize) {
597 if size == 0 {
598 return;

Callers 4

_export_init_cabiFunction · 0.70
_export_help_cabiFunction · 0.70
_export_admin_cabiFunction · 0.70
_export_on_msg_cabiFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected