From c5bdc35b606505940333fc605daae2532ca5710c Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 1 Mar 2016 22:05:39 -0500 Subject: refactor and generalize revisions --- src/compiletest/errors.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compiletest/errors.rs') diff --git a/src/compiletest/errors.rs b/src/compiletest/errors.rs index 63bc657baa4..44634e4d565 100644 --- a/src/compiletest/errors.rs +++ b/src/compiletest/errors.rs @@ -33,7 +33,7 @@ enum WhichLine { ThisLine, FollowPrevious(usize), AdjustBackward(usize) } /// /// If cfg is not None (i.e., in an incremental test), then we look /// for `//[X]~` instead, where `X` is the current `cfg`. -pub fn load_errors(testfile: &Path, cfg: &Option) -> Vec { +pub fn load_errors(testfile: &Path, cfg: Option<&str>) -> Vec { let rdr = BufReader::new(File::open(testfile).unwrap()); // `last_nonfollow_error` tracks the most recently seen @@ -46,8 +46,8 @@ pub fn load_errors(testfile: &Path, cfg: &Option) -> Vec // updating it in the map callback below.) let mut last_nonfollow_error = None; - let tag = match *cfg { - Some(ref rev) => format!("//[{}]~", rev), + let tag = match cfg { + Some(rev) => format!("//[{}]~", rev), None => format!("//~") }; -- cgit 1.4.1-3-g733a5