aboutsummaryrefslogtreecommitdiffstats
path: root/crates/turtle/src/atuin_history/stats.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/turtle/src/atuin_history/stats.rs')
-rw-r--r--crates/turtle/src/atuin_history/stats.rs12
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,