MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / truncate

Function truncate

dstack-util/src/system_setup.rs:700–706  ·  view source on GitHub ↗
(s: &[u8], len: usize)

Source from the content-addressed store, hash-verified

698}
699
700fn truncate(s: &[u8], len: usize) -> &[u8] {
701 if s.len() > len {
702 &s[..len]
703 } else {
704 s
705 }
706}
707
708fn emit_key_provider_info(provider_info: &KeyProviderInfo) -> Result<()> {
709 info!("Key provider info: {provider_info:?}");

Callers 2

display_tsMethod · 0.85
measure_app_infoMethod · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected