From fbd8b4c4b4678c0df902a540ac3c74a5d6ac7040 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 11 Dec 2021 02:35:47 -0500 Subject: clippy --- src/history.rs | 15 +++++++-------- src/state.rs | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/history.rs b/src/history.rs index 4c77aad..cc777f7 100644 --- a/src/history.rs +++ b/src/history.rs @@ -6,7 +6,7 @@ use textmode::Textmode as _; pub struct History { size: (u16, u16), - entries: Vec>, + entries: Vec>, } impl History { @@ -91,9 +91,8 @@ impl History { let (exe, args) = crate::parse::cmd(cmd); let (input_w, input_r) = async_std::channel::unbounded(); let (resize_w, resize_r) = async_std::channel::unbounded(); - let entry = crate::util::mutex(HistoryEntry::new( - cmd, self.size, input_w, resize_w, - )); + let entry = + crate::util::mutex(Entry::new(cmd, self.size, input_w, resize_w)); if crate::builtins::is(&exe) { let code: i32 = crate::builtins::run(&exe, &args).into(); entry.lock_arc().await.exit_info = Some(ExitInfo::new( @@ -129,7 +128,7 @@ impl History { pub async fn entry( &self, idx: usize, - ) -> async_std::sync::MutexGuardArc { + ) -> async_std::sync::MutexGuardArc { self.entries[idx].lock_arc().await } @@ -138,7 +137,7 @@ impl History { } } -pub struct HistoryEntry { +pub struct Entry { cmd: String, vt: vt100::Parser, audible_bell_state: usize, @@ -151,7 +150,7 @@ pub struct HistoryEntry { exit_info: Option, } -impl HistoryEntry { +impl Entry { fn new( cmd: &str, size: (u16, u16), @@ -372,7 +371,7 @@ impl ExitInfo { fn run_process( mut child: pty_process::async_std::Child, - entry: crate::util::Mutex, + entry: crate::util::Mutex, input_r: async_std::channel::Receiver>, resize_r: async_std::channel::Receiver<(u16, u16)>, action_w: async_std::channel::Sender, diff --git a/src/state.rs b/src/state.rs index 9f62194..eee39ae 100644 --- a/src/state.rs +++ b/src/state.rs @@ -264,7 +264,7 @@ impl State { &self, focus: crate::action::Focus, entry: Option< - &mut async_std::sync::MutexGuardArc, + &mut async_std::sync::MutexGuardArc, >, ) -> crate::action::Scene { match focus { @@ -291,7 +291,7 @@ impl State { &mut self, new_focus: crate::action::Focus, entry: Option< - &mut async_std::sync::MutexGuardArc, + &mut async_std::sync::MutexGuardArc, >, ) { self.focus = new_focus; -- cgit v1.2.3-54-g00ecf