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/atuin_history/stats.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/atuin_history/stats.rs')
| -rw-r--r-- | crates/turtle/src/atuin_history/stats.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/turtle/src/atuin_history/stats.rs b/crates/turtle/src/atuin_history/stats.rs index e47d6c8e..12d1ffc5 100644 --- a/crates/turtle/src/atuin_history/stats.rs +++ b/crates/turtle/src/atuin_history/stats.rs @@ -7,10 +7,10 @@ use unicode_segmentation::UnicodeSegmentation; use crate::atuin_client::{history::History, settings::Settings, theme::Meaning, theme::Theme}; #[derive(Debug, Clone, Serialize, Deserialize)] -pub struct Stats { - pub total_commands: usize, - pub unique_commands: usize, - pub top: Vec<(Vec<String>, usize)>, +pub(crate) struct Stats { + pub(crate) total_commands: usize, + pub(crate) unique_commands: usize, + pub(crate) top: Vec<(Vec<String>, usize)>, } fn first_non_whitespace(s: &str) -> Option<usize> { @@ -162,7 +162,7 @@ fn strip_leading_env_vars(command: &str) -> &str { command[token_start_pos..].trim() } -pub fn pretty_print(stats: Stats, ngram_size: usize, theme: &Theme) { +pub(crate) fn pretty_print(stats: Stats, ngram_size: usize, theme: &Theme) { let max = stats.top.iter().map(|x| x.1).max().unwrap(); let num_pad = max.ilog10() as usize + 1; @@ -239,7 +239,7 @@ pub fn pretty_print(stats: Stats, ngram_size: usize, theme: &Theme) { println!("Unique commands: {}", stats.unique_commands); } -pub fn compute( +pub(crate) fn compute( settings: &Settings, history: &[History], count: usize, |
