summaryrefslogtreecommitdiff
path: root/cc/tests/support/mod.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2018-12-10 21:02:04 -0800
committerDaniel Mueller <deso@posteo.net>2018-12-10 21:02:04 -0800
commit8898de1f97aff9965e1518ca5abb554275183a14 (patch)
treeac7deb92599ec56d67432766b2cf4cd63388833a /cc/tests/support/mod.rs
parente2604a756aaddcd5919ee2f1b9cc0055d200f846 (diff)
downloadnitrocli-8898de1f97aff9965e1518ca5abb554275183a14.tar.gz
nitrocli-8898de1f97aff9965e1518ca5abb554275183a14.tar.bz2
Update cc crate to 1.0.25
This change updates the cc crate to version 1.0.25. Import subrepo cc/:cc at fe0a7acb6d3e22e03bf83bcbf89367be888b5448
Diffstat (limited to 'cc/tests/support/mod.rs')
-rw-r--r--cc/tests/support/mod.rs19
1 files changed, 14 insertions, 5 deletions
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
}