From 199563550dd41c3dfb703bd3747604a8a03cdbc5 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 11 Jun 2026 14:20:49 +0200 Subject: 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)` --- crates/turtle/src/command/client/history.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/turtle/src/command/client/history.rs') diff --git a/crates/turtle/src/command/client/history.rs b/crates/turtle/src/command/client/history.rs index 0c61392c..e533759b 100644 --- a/crates/turtle/src/command/client/history.rs +++ b/crates/turtle/src/command/client/history.rs @@ -43,7 +43,7 @@ use super::search::format_duration_into; #[derive(Subcommand, Debug)] #[command(infer_subcommands = true)] -pub enum Cmd { +pub(crate) enum Cmd { /// Begins a new command in the history Start { /// Collects the command from the `ATUIN_COMMAND_LINE` environment variable, @@ -163,14 +163,14 @@ pub enum Cmd { } #[derive(Clone, Copy, Debug)] -pub enum ListMode { +pub(crate) enum ListMode { Human, CmdOnly, Regular, } impl ListMode { - pub const fn from_flags(human: bool, cmd_only: bool) -> Self { + pub(crate) const fn from_flags(human: bool, cmd_only: bool) -> Self { if human { ListMode::Human } else if cmd_only { @@ -182,7 +182,7 @@ impl ListMode { } #[expect(clippy::cast_sign_loss)] -pub fn print_list( +pub(crate) fn print_list( h: &[History], list_mode: ListMode, format: Option<&str>, @@ -1078,7 +1078,7 @@ impl Cmd { } #[expect(clippy::too_many_lines)] - pub async fn run(self, settings: &Settings) -> Result<()> { + pub(crate) async fn run(self, settings: &Settings) -> Result<()> { match self { Self::Start { cmd_env, -- cgit v1.3.1