diff options
Diffstat (limited to '')
9 files changed, 24 insertions, 15 deletions
diff --git a/crates/turtle/src/command/client.rs b/crates/turtle/src/command/client.rs index 2ec5abe7..6c0e70e8 100644 --- a/crates/turtle/src/command/client.rs +++ b/crates/turtle/src/command/client.rs @@ -3,13 +3,16 @@ use std::path::{Path, PathBuf}; use clap::Subcommand; use eyre::{Result, WrapErr}; +use tracing_subscriber::util::SubscriberInitExt; -use crate::atuin_client::{ - database::ClientSqlite, record::sqlite_store::SqliteStore, settings::Settings, -}; use tracing_appender::rolling::{RollingFileAppender, Rotation}; use tracing_subscriber::{ - Layer, filter::EnvFilter, filter::LevelFilter, fmt, fmt::format::FmtSpan, prelude::*, + Layer, filter::EnvFilter, filter::LevelFilter, fmt, fmt::format::FmtSpan, + prelude::__tracing_subscriber_SubscriberExt, +}; + +use crate::atuin_client::{ + database::ClientSqlite, record::sqlite_store::SqliteStore, settings::Settings, }; fn cleanup_old_logs(log_dir: &Path, prefix: &str, retention_days: u64) { diff --git a/crates/turtle/src/command/client/daemon.rs b/crates/turtle/src/command/client/daemon.rs index 30b478ec..39aa1b1e 100644 --- a/crates/turtle/src/command/client/daemon.rs +++ b/crates/turtle/src/command/client/daemon.rs @@ -548,7 +548,9 @@ fn kill_process(pid: u32) { #[cfg(test)] mod tests { - use super::*; + use super::{ + DAEMON_PROTOCOL_VERSION, DAEMON_VERSION, daemon_matches_expected, daemon_mismatch_message, + }; #[test] fn test_version_matches() { diff --git a/crates/turtle/src/command/client/history.rs b/crates/turtle/src/command/client/history.rs index fde73449..9f383a08 100644 --- a/crates/turtle/src/command/client/history.rs +++ b/crates/turtle/src/command/client/history.rs @@ -1043,7 +1043,9 @@ impl Cmd { mod tests { use time::macros::datetime; - use super::*; + use super::{ + History, Settings, TailEvent, TailKind, Timezone, normalize_command_for_storage, parse_fmt, + }; #[test] fn normalize_command_strips_trailing_spaces_and_tabs() { diff --git a/crates/turtle/src/command/client/search/cursor.rs b/crates/turtle/src/command/client/search/cursor.rs index a69f1359..e13e52b3 100644 --- a/crates/turtle/src/command/client/search/cursor.rs +++ b/crates/turtle/src/command/client/search/cursor.rs @@ -279,15 +279,14 @@ impl Cursor { #[cfg(test)] mod cursor_tests { - use super::Cursor; - use super::*; + use super::{Cursor, WordJumpMode, WordJumper}; - static EMACS_WORD_JUMPER: WordJumper = WordJumper { + static EMACS_WORD_JUMPER: WordJumper<'_> = WordJumper { word_chars: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", word_jump_mode: WordJumpMode::Emacs, }; - static SUBL_WORD_JUMPER: WordJumper = WordJumper { + static SUBL_WORD_JUMPER: WordJumper<'_> = WordJumper { word_chars: "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?", word_jump_mode: WordJumpMode::Subl, }; diff --git a/crates/turtle/src/command/client/search/inspector.rs b/crates/turtle/src/command/client/search/inspector.rs index 6c2c59fe..186dcd3a 100644 --- a/crates/turtle/src/command/client/search/inspector.rs +++ b/crates/turtle/src/command/client/search/inspector.rs @@ -334,7 +334,10 @@ pub(crate) fn draw_full( mod tests { use super::draw_ultracompact; use crate::atuin_client::history::{History, HistoryId, HistoryStats}; - use ratatui::{backend::TestBackend, prelude::*}; + use ratatui::{ + backend::TestBackend, + prelude::{Line, Rect, Terminal}, + }; use time::OffsetDateTime; fn mock_history_stats() -> (History, HistoryStats) { diff --git a/crates/turtle/src/command/client/search/keybindings/actions.rs b/crates/turtle/src/command/client/search/keybindings/actions.rs index e9b654c5..2842d618 100644 --- a/crates/turtle/src/command/client/search/keybindings/actions.rs +++ b/crates/turtle/src/command/client/search/keybindings/actions.rs @@ -242,7 +242,7 @@ impl<'de> Deserialize<'de> for Action { #[cfg(test)] mod tests { - use super::*; + use super::Action; #[test] fn parse_basic_actions() { diff --git a/crates/turtle/src/command/client/search/keybindings/conditions.rs b/crates/turtle/src/command/client/search/keybindings/conditions.rs index e52e4864..fd993f2b 100644 --- a/crates/turtle/src/command/client/search/keybindings/conditions.rs +++ b/crates/turtle/src/command/client/search/keybindings/conditions.rs @@ -373,7 +373,7 @@ impl<'de> Deserialize<'de> for ConditionExpr { #[cfg(test)] mod tests { - use super::*; + use super::{ConditionAtom, ConditionExpr, EvalContext}; fn ctx( cursor: usize, diff --git a/crates/turtle/src/command/client/search/keybindings/key.rs b/crates/turtle/src/command/client/search/keybindings/key.rs index 841656d2..5e772238 100644 --- a/crates/turtle/src/command/client/search/keybindings/key.rs +++ b/crates/turtle/src/command/client/search/keybindings/key.rs @@ -315,7 +315,7 @@ impl<'de> Deserialize<'de> for KeyInput { #[cfg(test)] mod tests { - use super::*; + use super::{KeyCodeValue, KeyInput, SingleKey}; use ratatui::crossterm::event::{KeyCode, KeyEvent, KeyModifiers}; #[test] diff --git a/crates/turtle/src/command/client/search/keybindings/keymap.rs b/crates/turtle/src/command/client/search/keybindings/keymap.rs index 00678b20..067d9403 100644 --- a/crates/turtle/src/command/client/search/keybindings/keymap.rs +++ b/crates/turtle/src/command/client/search/keybindings/keymap.rs @@ -117,7 +117,7 @@ impl Default for Keymap { #[cfg(test)] mod tests { use super::super::conditions::ConditionAtom; - use super::*; + use super::{Action, EvalContext, KeyInput, KeyRule, Keymap, SingleKey}; fn make_ctx(cursor: usize, width: usize, selected: usize, len: usize) -> EvalContext { EvalContext { |
