From f4c5480c1d6230f9267c7ef435f81656f8e9c900 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sun, 29 Jul 2018 09:40:38 -0400 Subject: [PATCH 2/3] tests/style: 80 columns, dammit (cherry picked from commit 7c412bb2fa343a8d54090ea175c851cd822d8f62) --- tests/workdir.rs | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/tests/workdir.rs b/tests/workdir.rs index 3c47e94..a78f70d 100644 --- a/tests/workdir.rs +++ b/tests/workdir.rs @@ -49,7 +49,11 @@ impl WorkDir { /// Try to create a new file with the given name and contents in this /// directory. - pub fn try_create>(&self, name: P, contents: &str) -> io::Result<()> { + pub fn try_create>( + &self, + name: P, + contents: &str, + ) -> io::Result<()> { let path = self.dir.join(name); self.try_create_bytes(path, contents.as_bytes()) } @@ -70,7 +74,11 @@ impl WorkDir { /// Try to create a new file with the given name and contents in this /// directory. - fn try_create_bytes>(&self, path: P, contents: &[u8]) -> io::Result<()> { + fn try_create_bytes>( + &self, + path: P, + contents: &[u8], + ) -> io::Result<()> { let mut file = File::create(&path)?; file.write_all(contents)?; file.flush() @@ -190,7 +198,11 @@ impl WorkDir { match stdout.parse() { Ok(t) => t, Err(err) => { - panic!("could not convert from string: {:?}\n\n{}", err, stdout); + panic!( + "could not convert from string: {:?}\n\n{}", + err, + stdout + ); } } } @@ -221,7 +233,10 @@ impl WorkDir { write!(stdin, "{}", input) }); - let output = self.expect_success(cmd, child.wait_with_output().unwrap()); + let output = self.expect_success( + cmd, + child.wait_with_output().unwrap(), + ); worker.join().unwrap().unwrap(); output } -- 2.18.0