summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFukushima Shogo <59794072+fksms@users.noreply.github.com>2024-05-02 19:17:03 +0900
committerandy.boot <bootandy@gmail.com>2024-05-02 23:03:41 +0100
commita1574d6a066c30831fdfe2ab99b64972c84c7769 (patch)
tree02f720ecf6ffc0a2bcf6cd1d05cd5e42b427c678
parent184ea1f956fec5ce8df6de269df61ee7ccf037e7 (diff)
Formatting
-rw-r--r--src/main.rs8
-rw-r--r--src/node.rs2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 863d545..b2fc8a8 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -40,9 +40,9 @@ use utils::get_filesystem_devices;
use utils::simplify_dir_names;
use crate::node::Node;
+use chrono::Local;
use std::fs::File;
use std::io::Write;
-use chrono::Local;
static DEFAULT_NUMBER_OF_LINES: usize = 30;
static DEFAULT_TERMINAL_WIDTH: usize = 80;
@@ -239,7 +239,9 @@ fn main() {
let result = output_json(&output_filename, &top_level_nodes);
match result {
Ok(..) => {}
- Err(err) => { eprintln!("Error: {}", err) }
+ Err(err) => {
+ eprintln!("Error: {}", err)
+ }
}
}
@@ -346,4 +348,4 @@ fn output_json(output_filename: &str, top_level_nodes: &Vec<Node>) -> std::io::R
let mut file = File::create(output_filename)?;
file.write_all(serialized.as_bytes())?;
Ok(())
-} \ No newline at end of file
+}
diff --git a/src/node.rs b/src/node.rs
index 11c2297..522e1bb 100644
--- a/src/node.rs
+++ b/src/node.rs
@@ -3,9 +3,9 @@ use crate::utils::is_filtered_out_due_to_invert_regex;
use crate::utils::is_filtered_out_due_to_regex;
use regex::Regex;
+use serde::Serialize;
use std::cmp::Ordering;
use std::path::PathBuf;
-use serde::Serialize;
#[derive(Debug, Eq, Clone, Serialize)]
pub struct Node {