MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / sanitize_image_identity

Function sanitize_image_identity

crates/openshell-driver-vm/src/driver.rs:4390–4401  ·  view source on GitHub ↗
(image_identity: &str)

Source from the content-addressed store, hash-verified

4388}
4389
4390fn sanitize_image_identity(image_identity: &str) -> String {
4391 image_identity
4392 .chars()
4393 .map(|ch| {
4394 if ch.is_ascii_alphanumeric() || ch == '-' || ch == '_' || ch == '.' {
4395 ch
4396 } else {
4397 '-'
4398 }
4399 })
4400 .collect()
4401}
4402
4403fn unique_image_cache_suffix() -> String {
4404 let counter = IMAGE_CACHE_BUILD_COUNTER.fetch_add(1, Ordering::Relaxed);

Callers 2

image_cache_dirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected