Skip to content

Commit

Permalink
Format Rust code using rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jul 31, 2024
1 parent 09f79b1 commit e8adf7a
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 e8adf7a

Please sign in to comment.