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

Method version_tuple

vmm/src/app/image.rs:36–48  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

34
35impl ImageInfo {
36 pub fn version_tuple(&self) -> Option<(u16, u16, u16)> {
37 let version = self
38 .version
39 .split('.')
40 .take(3)
41 .map(|v| v.parse::<u16>())
42 .collect::<Result<Vec<_>, _>>()
43 .ok()?;
44 if version.len() < 3 {
45 return None;
46 }
47 Some((version[0], version[1], version[2]))
48 }
49}
50
51impl ImageInfo {

Callers 3

make_sys_configFunction · 0.80
config_qemuMethod · 0.80
configure_machineMethod · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected