diff options
| author | bors <bors@rust-lang.org> | 2015-01-29 05:47:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-29 05:47:21 +0000 |
| commit | bedd8108dc9b79402d1ea5349d766275f73398ff (patch) | |
| tree | 33580f180481d78ead16c7a8d3af4513968f4007 /src/compiletest/compiletest.rs | |
| parent | c5961ad06d45689b44ff305c15d6ec7ec65755a9 (diff) | |
| parent | bce81e24647507c82e02e9918f54e8e3a2431149 (diff) | |
| download | rust-bedd8108dc9b79402d1ea5349d766275f73398ff.tar.gz rust-bedd8108dc9b79402d1ea5349d766275f73398ff.zip | |
Auto merge of #21680 - japaric:slice, r=alexcrichton
Replaces `slice_*` method calls with slicing syntax, and removes `as_slice()` calls that are redundant due to `Deref`.
Diffstat (limited to 'src/compiletest/compiletest.rs')
| -rw-r--r-- | src/compiletest/compiletest.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index eedff1d1176..72966d835a6 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -369,8 +369,8 @@ pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::Test fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> { match full_version_line { Some(ref full_version_line) - if full_version_line.as_slice().trim().len() > 0 => { - let full_version_line = full_version_line.as_slice().trim(); + if full_version_line.trim().len() > 0 => { + let full_version_line = full_version_line.trim(); // used to be a regex "(^|[^0-9])([0-9]\.[0-9])([^0-9]|$)" for (pos, c) in full_version_line.char_indices() { @@ -409,8 +409,8 @@ fn extract_lldb_version(full_version_line: Option<String>) -> Option<String> { match full_version_line { Some(ref full_version_line) - if full_version_line.as_slice().trim().len() > 0 => { - let full_version_line = full_version_line.as_slice().trim(); + if full_version_line.trim().len() > 0 => { + let full_version_line = full_version_line.trim(); for (pos, l) in full_version_line.char_indices() { if l != 'l' && l != 'L' { continue } |
