diff options
| author | Conrad Ludgate <conrad.ludgate@truelayer.com> | 2022-04-21 08:05:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-21 08:05:57 +0100 |
| commit | 48747e3b7c542c696003f71ef4b4ae457934e57c (patch) | |
| tree | 0bbde7136b84cda46cdb758d2cbeda67ca436ee8 /src | |
| parent | Use the count cache (#312) (diff) | |
| download | atuin-48747e3b7c542c696003f71ef4b4ae457934e57c.zip | |
A few minor tweaks (#314)
* use bail macro
replace client database errors
remove dead code
* fix test
Diffstat (limited to 'src')
| -rw-r--r-- | src/command/stats.rs | 4 | ||||
| -rw-r--r-- | src/main.rs | 1 |
2 files changed, 2 insertions, 3 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