Skip to content

Commit 3f8fd6c

Browse files
committed
clippy
1 parent dc427a7 commit 3f8fd6c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/io.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
use std::error::Error;
2-
use std::fs::File;
3-
use std::io::Write;
42
use std::path::PathBuf;
53

64
use csv::WriterBuilder;
@@ -38,8 +36,13 @@ pub fn save_to_csv(data: &DataContainer, csv_options: &FileOptions) -> Result<()
3836
wtr.flush()?;
3937
if csv_options.save_raw_traffic {
4038
let mut path = csv_options.file_path.clone();
41-
let mut file_name = path.file_name().unwrap().to_str().unwrap().to_string();
42-
file_name.replace(".csv", "");
39+
let mut file_name = path
40+
.file_name()
41+
.unwrap()
42+
.to_str()
43+
.unwrap()
44+
.to_string()
45+
.replace(".csv", "");
4346
file_name += "raw.csv";
4447
path.set_file_name(file_name);
4548
save_raw(data, &path)?

0 commit comments

Comments
 (0)