MCPcopy Create free account
hub / github.com/Noumena-Network/code / compare_version

Function compare_version

rust/py_repl_host/src/main.rs:388–398  ·  view source on GitHub ↗
(left: &[u32], right: &[u32])

Source from the content-addressed store, hash-verified

386}
387
388fn compare_version(left: &[u32], right: &[u32]) -> i32 {
389 let length = left.len().max(right.len());
390 for index in 0..length {
391 let left_value = *left.get(index).unwrap_or(&0);
392 let right_value = *right.get(index).unwrap_or(&0);
393 if left_value != right_value {
394 return if left_value > right_value { 1 } else { -1 };
395 }
396 }
397 0
398}
399
400fn create_kernel_runtime_dir() -> io::Result<PathBuf> {
401 let now = SystemTime::now()

Callers 1

Calls 2

maxMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected