aboutsummaryrefslogtreecommitdiffstats
path: root/crates/turtle/src/command/client/history.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-13 00:50:54 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-13 00:50:54 +0200
commit6723829a3398b3c9dd6dc6ae79124f46000606ee (patch)
treea1ec535eddd711a4557e4bcc5b94382c3623504c /crates/turtle/src/command/client/history.rs
parentchore(treewide): Cleanup themes (diff)
downloadatuin-6723829a3398b3c9dd6dc6ae79124f46000606ee.zip
chore(treewide): Remove `cargo` warnings to 0
There are still the `clippy` warnings, but they are for a future date.
Diffstat (limited to 'crates/turtle/src/command/client/history.rs')
-rw-r--r--crates/turtle/src/command/client/history.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/crates/turtle/src/command/client/history.rs b/crates/turtle/src/command/client/history.rs
index 2ddcb3a6..e574a2e9 100644
--- a/crates/turtle/src/command/client/history.rs
+++ b/crates/turtle/src/command/client/history.rs
@@ -14,7 +14,7 @@ use super::daemon as daemon_cmd;
use colored::Colorize;
use serde::Serialize;
-use crate::atuin_daemon::history::{HistoryEventKind, TailHistoryReply};
+use crate::atuin_daemon::generated::history::{HistoryEventKind, TailHistoryReply};
use crate::atuin_client::{
database::{ClientSqlite, current_context},
@@ -166,11 +166,11 @@ pub(crate) enum ListMode {
impl ListMode {
pub(crate) const fn from_flags(human: bool, cmd_only: bool) -> Self {
if human {
- ListMode::Human
+ Self::Human
} else if cmd_only {
- ListMode::CmdOnly
+ Self::CmdOnly
} else {
- ListMode::Regular
+ Self::Regular
}
}
}
@@ -183,7 +183,7 @@ pub(crate) fn print_list(
reverse: bool,
tz: Timezone,
) {
- let w = std::io::stdout();
+ let w = io::stdout();
let mut w = w.lock();
let fmt_str = match list_mode {
@@ -202,6 +202,7 @@ pub(crate) fn print_list(
ListMode::CmdOnly => std::iter::once(ParseSegment::Key("command")).collect(),
};
+ #[allow(trivial_casts)]
let iterator = if reverse {
Box::new(h.iter().rev()) as Box<dyn Iterator<Item = &History>>
} else {
@@ -743,10 +744,10 @@ fn normalize_optional_field(value: &str) -> Option<String> {
impl Cmd {
async fn handle_tail(settings: &Settings) -> Result<()> {
- let tty = std::io::stdout().is_terminal();
+ let tty = io::stdout().is_terminal();
let mut client = daemon::tail_client(settings).await?;
let mut stream = client.tail_history().await?;
- let stdout = std::io::stdout();
+ let stdout = io::stdout();
while let Some(reply) = stream.message().await? {
let event = TailEvent::from_proto(reply)?;