(&self)
| 34 | |
| 35 | impl 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 | |
| 51 | impl ImageInfo { |
no test coverage detected