diff options
Diffstat (limited to 'src/compiletest/header.rs')
| -rw-r--r-- | src/compiletest/header.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs index f83c27b75d6..66059d2d13d 100644 --- a/src/compiletest/header.rs +++ b/src/compiletest/header.rs @@ -352,8 +352,8 @@ pub fn gdb_version_to_int(version_string: &str) -> int { panic!("{}", error_string); } - let major: int = components[0].parse().expect(error_string); - let minor: int = components[1].parse().expect(error_string); + let major: int = components[0].parse().ok().expect(error_string); + let minor: int = components[1].parse().ok().expect(error_string); return major * 1000 + minor; } @@ -363,6 +363,6 @@ pub fn lldb_version_to_int(version_string: &str) -> int { "Encountered LLDB version string with unexpected format: {}", version_string); let error_string = error_string.as_slice(); - let major: int = version_string.parse().expect(error_string); + let major: int = version_string.parse().ok().expect(error_string); return major; } |
