aboutsummaryrefslogtreecommitdiffstats
path: root/src/command
diff options
context:
space:
mode:
authorConrad Ludgate <conrad.ludgate@truelayer.com>2022-04-21 08:05:57 +0100
committerGitHub <noreply@github.com>2022-04-21 08:05:57 +0100
commit48747e3b7c542c696003f71ef4b4ae457934e57c (patch)
tree0bbde7136b84cda46cdb758d2cbeda67ca436ee8 /src/command
parentUse the count cache (#312) (diff)
downloadatuin-48747e3b7c542c696003f71ef4b4ae457934e57c.zip
A few minor tweaks (#314)
* use bail macro replace client database errors remove dead code * fix test
Diffstat (limited to '')
-rw-r--r--src/command/stats.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command/stats.rs b/src/command/stats.rs
index d7bddc82..6d342c19 100644
--- a/src/command/stats.rs
+++ b/src/command/stats.rs
@@ -6,7 +6,7 @@ use chrono_english::parse_date_string;
use clap::Parser;
use cli_table::{format::Justify, print_stdout, Cell, Style, Table};
-use eyre::{eyre, Result};
+use eyre::{bail, Result};
use atuin_client::database::Database;
use atuin_client::history::History;
@@ -32,7 +32,7 @@ fn compute_stats(history: &[History]) -> Result<()> {
let most_common_command = commands.iter().max_by(|a, b| a.1.cmp(b.1));
if most_common_command.is_none() {
- return Err(eyre!("No commands found"));
+ bail!("No commands found");
}
let table = vec![