diff options
| author | Andre Bogus <bogusandre@gmail.com> | 2017-06-27 07:16:54 +0200 |
|---|---|---|
| committer | Andre Bogus <bogusandre@gmail.com> | 2017-06-27 07:16:54 +0200 |
| commit | 1715559f82a7576c8d64430dbff05bc007f1a6e9 (patch) | |
| tree | 2910841571cb01d734385b2861e0ad5ea33becef | |
| parent | 3d25238d6d702b4a60b185c08a8f50a4d16e2600 (diff) | |
| download | rust-1715559f82a7576c8d64430dbff05bc007f1a6e9.tar.gz rust-1715559f82a7576c8d64430dbff05bc007f1a6e9.zip | |
address tidy error & comment
| -rw-r--r-- | src/tools/compiletest/src/header.rs | 4 | ||||
| -rw-r--r-- | src/tools/compiletest/src/main.rs | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index ce33787a7d3..c9e24492207 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -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 { diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 692e31ebad0..defb405c09d 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -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) }; |
