Skip to content

Commit

Permalink
refactor: fix lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael DEMACON <quantumsheep@users.noreply.github.com>
  • Loading branch information
quantumsheep committed Jun 29, 2024
1 parent b7c81ee commit 2505017
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct Args {
)]
config: Vec<String>,

/// Shows ProxyCommand
/// Shows `ProxyCommand`
#[arg(long, default_value_t = false)]
show_proxy_command: bool,

Expand Down
2 changes: 1 addition & 1 deletion src/searchable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ where

pub fn search(&mut self, value: &str) {
if value.is_empty() {
self.filtered = self.vec.clone();
self.filtered.clone_from(&self.vec);
return;
}

Expand Down
12 changes: 6 additions & 6 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ impl App {
Ok(())
}

fn run<B: Backend>(&mut self, terminal: &Rc<RefCell<Terminal<B>>>) -> Result<()>
fn run<B>(&mut self, terminal: &Rc<RefCell<Terminal<B>>>) -> Result<()>
where
B: std::io::Write,
B: Backend + std::io::Write,
{
loop {
terminal.borrow_mut().draw(|f| ui(f, self))?;
Expand Down Expand Up @@ -319,9 +319,9 @@ impl App {
}
}

fn setup_terminal<B: Backend>(terminal: &Rc<RefCell<Terminal<B>>>) -> Result<()>
fn setup_terminal<B>(terminal: &Rc<RefCell<Terminal<B>>>) -> Result<()>
where
B: std::io::Write,
B: Backend + std::io::Write,
{
let mut terminal = terminal.borrow_mut();

Expand All @@ -337,9 +337,9 @@ where
Ok(())
}

fn restore_terminal<B: Backend>(terminal: &Rc<RefCell<Terminal<B>>>) -> Result<()>
fn restore_terminal<B>(terminal: &Rc<RefCell<Terminal<B>>>) -> Result<()>
where
B: std::io::Write,
B: Backend + std::io::Write,
{
let mut terminal = terminal.borrow_mut();
terminal.clear()?;
Expand Down

0 comments on commit 2505017

Please sign in to comment.