diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-11 14:20:49 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-11 14:20:49 +0200 |
| commit | 199563550dd41c3dfb703bd3747604a8a03cdbc5 (patch) | |
| tree | 30cfa3e5539f782b7571091c742ee1c219e138fb /crates/turtle/src/command/client/search/interactive.rs | |
| parent | chore: Restore db migrations (diff) | |
| download | atuin-199563550dd41c3dfb703bd3747604a8a03cdbc5.zip | |
chore: Remove all `pub`s
They will not be marked by rustc/cargo as unused, and as atuin doesn't
expose an API all of them _should_ be `pub(crate)`
Diffstat (limited to 'crates/turtle/src/command/client/search/interactive.rs')
| -rw-r--r-- | crates/turtle/src/command/client/search/interactive.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/crates/turtle/src/command/client/search/interactive.rs b/crates/turtle/src/command/client/search/interactive.rs index a3d2cb79..380fc33b 100644 --- a/crates/turtle/src/command/client/search/interactive.rs +++ b/crates/turtle/src/command/client/search/interactive.rs @@ -52,7 +52,7 @@ use ratatui::crossterm::event::{ const TAB_TITLES: [&str; 2] = ["Search", "Inspect"]; -pub enum InputAction { +pub(crate) enum InputAction { Accept(usize), AcceptInspecting, Copy(usize), @@ -66,33 +66,33 @@ pub enum InputAction { } #[derive(Clone)] -pub struct InspectingState { +pub(crate) struct InspectingState { current: Option<HistoryId>, next: Option<HistoryId>, previous: Option<HistoryId>, } impl InspectingState { - pub fn move_to_previous(&mut self) { + pub(crate) fn move_to_previous(&mut self) { let previous = self.previous.clone(); self.reset(); self.current = previous; } - pub fn move_to_next(&mut self) { + pub(crate) fn move_to_next(&mut self) { let next = self.next.clone(); self.reset(); self.current = next; } - pub fn reset(&mut self) { + pub(crate) fn reset(&mut self) { self.current = None; self.next = None; self.previous = None; } } -pub fn to_compactness(f: &Frame, settings: &Settings) -> Compactness { +pub(crate) fn to_compactness(f: &Frame, settings: &Settings) -> Compactness { if match settings.style { crate::atuin_client::settings::Style::Auto => f.area().height < 14, crate::atuin_client::settings::Style::Compact => true, @@ -110,7 +110,7 @@ pub fn to_compactness(f: &Frame, settings: &Settings) -> Compactness { #[expect(clippy::struct_field_names)] #[expect(clippy::struct_excessive_bools)] -pub struct State { +pub(crate) struct State { history_count: i64, results_state: ListState, switched_search_mode: bool, @@ -124,7 +124,7 @@ pub struct State { pending_vim_key: Option<char>, original_input_empty: bool, - pub inspecting_state: InspectingState, + pub(crate) inspecting_state: InspectingState, keymaps: KeymapSet, search: SearchState, @@ -133,7 +133,7 @@ pub struct State { } #[derive(Clone, Copy)] -pub enum Compactness { +pub(crate) enum Compactness { Ultracompact, Compact, Full, @@ -231,7 +231,7 @@ impl State { } } - pub fn initialize_keymap_cursor(&mut self, settings: &Settings) { + pub(crate) fn initialize_keymap_cursor(&mut self, settings: &Settings) { match self.keymap_mode { KeymapMode::Emacs => self.set_keymap_cursor(settings, "emacs"), KeymapMode::VimNormal => self.set_keymap_cursor(settings, "vim_normal"), @@ -240,7 +240,7 @@ impl State { } } - pub fn finalize_keymap_cursor(&mut self, settings: &Settings) { + pub(crate) fn finalize_keymap_cursor(&mut self, settings: &Settings) { match settings.keymap_mode_shell { KeymapMode::Emacs => self.set_keymap_cursor(settings, "emacs"), KeymapMode::VimNormal => self.set_keymap_cursor(settings, "vim_normal"), @@ -1433,7 +1433,7 @@ struct Stdout { } impl Stdout { - pub fn new(inline_mode: bool, no_mouse: bool) -> std::io::Result<Self> { + pub(crate) fn new(inline_mode: bool, no_mouse: bool) -> std::io::Result<Self> { terminal::enable_raw_mode()?; let mut writer = TerminalWriter::new()?; @@ -1547,7 +1547,7 @@ fn compute_popup_placement( clippy::too_many_lines, clippy::cognitive_complexity )] -pub async fn history( +pub(crate) async fn history( query: &[String], settings: &Settings, mut db: impl Database, |
