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

Function truncate40

vmm/src/main_service.rs:47–53  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

45
46fn app_id_of(compose_file: &str) -> String {
47 fn truncate40(s: &str) -> &str {
48 if s.len() > 40 {
49 &s[..40]
50 } else {
51 s
52 }
53 }
54 truncate40(&hex_sha256(compose_file)).to_string()
55}
56

Callers 1

app_id_ofFunction · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected