about summary refs log tree commit diff
path: root/src/compiletest/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-09-01 15:44:50 +0000
committerbors <bors@rust-lang.org>2015-09-01 15:44:50 +0000
commit7e3eabc699b99ce33540afc71ee3a20d02ddd89c (patch)
tree6578b3fae987b35e46f358dbe5f9e0bef1b344f9 /src/compiletest/errors.rs
parent2e9a74e3ab289821b4377f7a58a609331e13b145 (diff)
parent99383f8f5c276d8060f2105ff7e678c81bf4df05 (diff)
downloadrust-7e3eabc699b99ce33540afc71ee3a20d02ddd89c.tar.gz
rust-7e3eabc699b99ce33540afc71ee3a20d02ddd89c.zip
Auto merge of #28152 - llogiq:master, r=Manishearth
This changes a lot of `.to_string()` to `.to_owned()`, removes a few redundant closures, and changes some `match`es to `if let`s.

I'm currently in the process of trying out clippy and acting on its suggestions. I started with compiletest, because we use it to test clippy, too. If this finds positive reception, I may continue refactoring other parts of the rust codebase.
Diffstat (limited to 'src/compiletest/errors.rs')
-rw-r--r--src/compiletest/errors.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs
index 4b2a3e0283d..a3ad022ebd5 100644
--- a/src/compiletest/errors.rs
+++ b/src/compiletest/errors.rs
@@ -76,7 +76,7 @@ fn parse_expected(last_nonfollow_error: Option<usize>,
     let letters = line[kind_start..].chars();
     let msg = letters.skip_while(|c| c.is_whitespace())
                      .skip_while(|c| !c.is_whitespace())
-                     .collect::<String>().trim().to_string();
+                     .collect::<String>().trim().to_owned();
 
     let (which, line) = if follow {
         assert!(adjusts == 0, "use either //~| or //~^, not both.");