diff options
author | Sebastian Nowicki <sebnow@gmail.com> | 2017-10-16 14:27:15 +0200 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2017-10-20 20:51:12 -0400 |
commit | 0d2354aca6a6a399b01047e1cfaf14cd17099f34 (patch) | |
tree | fe5b415709a1a420c553aee828ad4cd759d65e64 /tests/workdir.rs | |
parent | 8dc513b5d2fad3bfc820c60724575c02b0c259ae (diff) |
Wrap comments to 79 columns
Diffstat (limited to 'tests/workdir.rs')
-rw-r--r-- | tests/workdir.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/workdir.rs b/tests/workdir.rs index fb3ef4f5..afa876bf 100644 --- a/tests/workdir.rs +++ b/tests/workdir.rs @@ -41,12 +41,14 @@ impl WorkDir { } } - /// Create a new file with the given name and contents in this directory, or panic on error. + /// Create a new file with the given name and contents in this directory, + /// or panic on error. pub fn create<P: AsRef<Path>>(&self, name: P, contents: &str) { self.create_bytes(name, contents.as_bytes()); } - /// Try to create a new file with the given name and contents in this directory. + /// Try to create a new file with the given name and contents in this + /// directory. pub fn try_create<P: AsRef<Path>>(&self, name: P, contents: &str) -> io::Result<()> { self.try_create_bytes(name, contents.as_bytes()) } @@ -58,13 +60,15 @@ impl WorkDir { nice_err(&path, file.set_len(filesize)); } - /// Create a new file with the given name and contents in this directory, or panic on error. + /// Create a new file with the given name and contents in this directory, + /// or panic on error. pub fn create_bytes<P: AsRef<Path>>(&self, name: P, contents: &[u8]) { let path = self.dir.join(name); nice_err(&path, self.try_create_bytes(&path, contents)); } - /// Try to create a new file with the given name and contents in this directory. + /// Try to create a new file with the given name and contents in this + /// directory. fn try_create_bytes<P: AsRef<Path>>(&self, path: P, contents: &[u8]) -> io::Result<()> { let mut file = File::create(&path)?; file.write_all(contents)?; |