address tidy error & comment
This commit is contained in:
parent
3d25238d6d
commit
1715559f82
@ -549,9 +549,7 @@ impl Config {
|
||||
pub fn lldb_version_to_int(version_string: &str) -> isize {
|
||||
let error_string = format!("Encountered LLDB version string with unexpected format: {}",
|
||||
version_string);
|
||||
let error_string = error_string;
|
||||
let major: isize = version_string.parse().expect(&error_string);
|
||||
major
|
||||
version_string.parse().expect(&error_string);
|
||||
}
|
||||
|
||||
fn expand_variables(mut value: String, config: &Config) -> String {
|
||||
|
@ -598,7 +598,8 @@ fn extract_gdb_version(full_version_line: &str) -> Option<u32> {
|
||||
Some(idx) => if line.as_bytes()[idx] == b'.' {
|
||||
let patch = &line[idx + 1..];
|
||||
|
||||
let patch_len = patch.find(|c: char| !c.is_digit(10)).unwrap_or_else(|| patch.len());
|
||||
let patch_len = patch.find(|c: char| !c.is_digit(10))
|
||||
.unwrap_or_else(|| patch.len());
|
||||
let patch = &patch[..patch_len];
|
||||
let patch = if patch_len > 3 || patch_len == 0 { None } else { Some(patch) };
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user