Skip to content

Commit

Permalink
Merge pull request #17 from acridotheres/rustfmt-09f79b1038676c2f0af4…
Browse files Browse the repository at this point in the history
…373e84dead26de722407

Format code using rustfmt for 09f79b1
  • Loading branch information
Le0X8 authored Jul 31, 2024
2 parents 09f79b1 + e8adf7a commit 451081a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{
cmp::min,
fs::{FileTimes, OpenOptions},
io::{Read, Seek, Write},
mem::drop
mem::drop,
};

use chrono::{DateTime, Utc};
Expand All @@ -26,7 +26,11 @@ impl<'a> FileReader {
let mut file = OpenOptions::new().read(true).open(path).unwrap();
file.rewind().unwrap();

Self { path: path.to_owned(), file, pos: 0 }
Self {
path: path.to_owned(),
file,
pos: 0,
}
}

pub fn close(self) {
Expand Down Expand Up @@ -201,7 +205,11 @@ impl<'a> FileWriter {
.unwrap();
file.rewind().unwrap();

Self { path: path.to_owned(), file, pos: 0 }
Self {
path: path.to_owned(),
file,
pos: 0,
}
}

pub fn close(self) {
Expand Down

0 comments on commit 451081a

Please sign in to comment.