summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPiotr Wach <pwach@bloomberg.net>2024-01-07 20:39:26 +0000
committerPiotr Wach <pwach@bloomberg.net>2024-01-07 20:39:26 +0000
commitb3236dcb3db927f3709e9355b218f42327a66a99 (patch)
tree85c00b654237e8d8767258da1c6afa99d995f78a /src
parent8aaa05ada6169860cd083a24764bc2c5915b220b (diff)
fmt
Diffstat (limited to 'src')
-rw-r--r--src/interactive/app/bytevis.rs2
-rw-r--r--src/interactive/app/eventloop.rs14
-rw-r--r--src/interactive/app/terminal_app.rs3
-rw-r--r--src/interactive/app/tests/journeys_readonly.rs6
-rw-r--r--src/interactive/app/tests/utils.rs5
-rw-r--r--src/main.rs1
-rw-r--r--src/traverse.rs2
7 files changed, 18 insertions, 15 deletions
diff --git a/src/interactive/app/bytevis.rs b/src/interactive/app/bytevis.rs
index 96f934e..19efa08 100644
--- a/src/interactive/app/bytevis.rs
+++ b/src/interactive/app/bytevis.rs
@@ -1,4 +1,4 @@
-use dua::{ByteFormat};
+use dua::ByteFormat;
use std::fmt;
#[derive(Default, Clone, Copy)]
diff --git a/src/interactive/app/eventloop.rs b/src/interactive/app/eventloop.rs
index bd6b711..efb4cd1 100644
--- a/src/interactive/app/eventloop.rs
+++ b/src/interactive/app/eventloop.rs
@@ -4,8 +4,8 @@ use crate::{
app::navigation::Navigation,
app_state::FocussedPane,
sorted_entries,
- widgets::{glob_search, MainWindow, MainWindowProps}, CursorDirection, CursorMode, DisplayOptions,
- MarkEntryMode,
+ widgets::{glob_search, MainWindow, MainWindowProps},
+ CursorDirection, CursorMode, DisplayOptions, MarkEntryMode,
},
};
use anyhow::Result;
@@ -16,20 +16,16 @@ use dua::{
traverse::{size_on_disk, EntryData, Traversal},
WalkOptions, WalkResult,
};
-use std::{
- time::{SystemTime, UNIX_EPOCH},
-};
+use std::time::{SystemTime, UNIX_EPOCH};
use tui::backend::Backend;
use tui_react::Terminal;
+use super::app_state::{AppState, Cursor, ProcessingResult};
use super::{
app_state::{parent_or_panic, pop_or_panic, set_entry_info_or_panic, EntryInfo},
terminal_app::TraversalEvent,
tree_view::TreeView,
};
-use super::{
- app_state::{AppState, Cursor, ProcessingResult},
-};
impl AppState {
pub fn navigation_mut(&mut self) -> &mut Navigation {
@@ -355,7 +351,7 @@ impl AppState {
self.traversal_state.received_event = true;
}
key
- },
+ }
Event::Resize(_, _) => refresh_key(),
_ => return Ok(None),
};
diff --git a/src/interactive/app/terminal_app.rs b/src/interactive/app/terminal_app.rs
index 8728f14..537cb6f 100644
--- a/src/interactive/app/terminal_app.rs
+++ b/src/interactive/app/terminal_app.rs
@@ -13,7 +13,8 @@ use tui_react::Terminal;
use crate::{crossdev, interactive::widgets::MainWindow};
use super::{
- app_state::{AppState, ProcessingResult, TraversalState}, sorted_entries, DisplayOptions,
+ app_state::{AppState, ProcessingResult, TraversalState},
+ sorted_entries, DisplayOptions,
};
/// State and methods representing the interactive disk usage analyser for the terminal
diff --git a/src/interactive/app/tests/journeys_readonly.rs b/src/interactive/app/tests/journeys_readonly.rs
index 669effd..72daf03 100644
--- a/src/interactive/app/tests/journeys_readonly.rs
+++ b/src/interactive/app/tests/journeys_readonly.rs
@@ -303,7 +303,11 @@ fn simple_user_journey_read_only() -> Result<()> {
);
// when advancing the selection to the marker pane
- app.process_events(&mut terminal, into_keys(Some(KeyCode::Tab)), traversal_events)?;
+ app.process_events(
+ &mut terminal,
+ into_keys(Some(KeyCode::Tab)),
+ traversal_events,
+ )?;
{
assert_eq!(
Some(true),
diff --git a/src/interactive/app/tests/utils.rs b/src/interactive/app/tests/utils.rs
index a9d5fcc..6be28ab 100644
--- a/src/interactive/app/tests/utils.rs
+++ b/src/interactive/app/tests/utils.rs
@@ -19,7 +19,10 @@ use std::{
use tui::backend::TestBackend;
use tui_react::Terminal;
-use crate::interactive::{app::tests::FIXTURE_PATH, terminal_app::{TerminalApp, TraversalEvent}};
+use crate::interactive::{
+ app::tests::FIXTURE_PATH,
+ terminal_app::{TerminalApp, TraversalEvent},
+};
pub fn into_keys<'a>(
codes: impl IntoIterator<Item = KeyCode> + 'a,
diff --git a/src/main.rs b/src/main.rs
index fcee61f..52abdc6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -10,7 +10,6 @@ use std::{fs, io, io::Write, path::PathBuf, process};
use crate::interactive::input::input_channel;
use crate::interactive::terminal_app::TerminalApp;
-
mod crossdev;
#[cfg(feature = "tui-crossplatform")]
mod interactive;
diff --git a/src/traverse.rs b/src/traverse.rs
index 6ed7a60..e1e4b9a 100644
--- a/src/traverse.rs
+++ b/src/traverse.rs
@@ -1,4 +1,4 @@
-use crate::{get_size_or_panic};
+use crate::get_size_or_panic;
use filesize::PathExt;
use petgraph::{graph::NodeIndex, stable_graph::StableGraph, Directed, Direction};