From 7f587418daf8e7ddc5e32f06f85e9724c2ecf355 Mon Sep 17 00:00:00 2001 From: Lucas Burns <44355502+lmburns@users.noreply.github.com> Date: Sun, 13 Mar 2022 14:53:49 -0500 Subject: Fix `history list --cwd` errors (#278) --- src/command/search.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/command/search.rs') diff --git a/src/command/search.rs b/src/command/search.rs index c9942143..6e7ec25b 100644 --- a/src/command/search.rs +++ b/src/command/search.rs @@ -1,7 +1,6 @@ use chrono::Utc; use eyre::Result; -use std::time::Duration; -use std::{io::stdout, ops::Sub}; +use std::{io::stdout, ops::Sub, time::Duration}; use termion::{event::Key, input::MouseTerminal, raw::IntoRawMode, screen::AlternateScreen}; use tui::{ @@ -14,9 +13,11 @@ use tui::{ }; use unicode_width::UnicodeWidthStr; -use atuin_client::database::Database; -use atuin_client::history::History; -use atuin_client::settings::{SearchMode, Settings}; +use atuin_client::{ + database::Database, + history::History, + settings::{SearchMode, Settings}, +}; use crate::command::event::{Event, Events}; @@ -96,7 +97,7 @@ impl State { .iter() .enumerate() .map(|(i, m)| { - let command = m.command.to_string().replace("\n", " ").replace("\t", " "); + let command = m.command.to_string().replace('\n', " ").replace('\t', " "); let mut command = Span::raw(command); -- cgit v1.3.1