MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / parse_java_major

Function parse_java_major

rust/src/jre.rs:352–359  ·  view source on GitHub ↗
(version: &str)

Source from the content-addressed store, hash-verified

350}
351
352fn parse_java_major(version: &str) -> Option<i32> {
353 let mut parts = version.split('.');
354 let first = parts.next()?.parse::<i32>().ok()?;
355 if first == 1 {
356 return parts.next()?.parse::<i32>().ok();
357 }
358 Some(first)
359}
360
361#[cfg(test)]
362mod tests {

Callers 1

Calls 2

splitMethod · 0.80
okMethod · 0.80

Tested by

no test coverage detected