From 8898de1f97aff9965e1518ca5abb554275183a14 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 10 Dec 2018 21:02:04 -0800 Subject: Update cc crate to 1.0.25 This change updates the cc crate to version 1.0.25. Import subrepo cc/:cc at fe0a7acb6d3e22e03bf83bcbf89367be888b5448 --- cc/tests/support/mod.rs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'cc/tests/support') diff --git a/cc/tests/support/mod.rs b/cc/tests/support/mod.rs index bb56bf3..cae8151 100644 --- a/cc/tests/support/mod.rs +++ b/cc/tests/support/mod.rs @@ -85,7 +85,9 @@ impl Test { .unwrap() .read_to_string(&mut s) .unwrap(); - Execution { args: s.lines().map(|s| s.to_string()).collect() } + Execution { + args: s.lines().map(|s| s.to_string()).collect(), + } } } @@ -111,11 +113,18 @@ impl Execution { } pub fn must_have_in_order(&self, before: &str, after: &str) -> &Execution { - let before_position = self.args.iter().rposition(|x| OsStr::new(x) == OsStr::new(before)); - let after_position = self.args.iter().rposition(|x| OsStr::new(x) == OsStr::new(after)); + let before_position = self.args + .iter() + .rposition(|x| OsStr::new(x) == OsStr::new(before)); + let after_position = self.args + .iter() + .rposition(|x| OsStr::new(x) == OsStr::new(after)); match (before_position, after_position) { - (Some(b), Some(a)) if b < a => {}, - (b, a) => { panic!("{:?} (last position: {:?}) did not appear before {:?} (last position: {:?})", before, b, after, a) }, + (Some(b), Some(a)) if b < a => {} + (b, a) => panic!( + "{:?} (last position: {:?}) did not appear before {:?} (last position: {:?})", + before, b, after, a + ), }; self } -- cgit v1.2.3