diff options
author | Blaž Hrastnik | 2022-11-04 12:01:17 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-11-04 12:06:28 +0000 |
commit | c2c1280f02b83a468da67d88350c199915427535 (patch) | |
tree | cd4306c1b7353bb960608e18c5633aa22c5d0204 /helix-term/src/ui | |
parent | 921d3510132b0bd89d4ac0a542371c3ae90e2e02 (diff) |
Resolve a bunch of upcoming clippy lints
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/menu.rs | 2 | ||||
-rw-r--r-- | helix-term/src/ui/prompt.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs index 99c2473d..1baaf40a 100644 --- a/helix-term/src/ui/menu.rs +++ b/helix-term/src/ui/menu.rs @@ -40,7 +40,7 @@ impl Item for PathBuf { type Data = PathBuf; fn label(&self, root_path: &Self::Data) -> Spans { - self.strip_prefix(&root_path) + self.strip_prefix(root_path) .unwrap_or(self) .to_string_lossy() .into() diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index d0991d3c..ca2872a7 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -32,7 +32,7 @@ pub struct Prompt { next_char_handler: Option<PromptCharHandler>, } -#[derive(Clone, Copy, PartialEq)] +#[derive(Clone, Copy, PartialEq, Eq)] pub enum PromptEvent { /// The prompt input has been updated. Update, @@ -408,7 +408,7 @@ impl Prompt { surface.set_stringn( area.x + col * (1 + col_width), area.y + row, - &completion, + completion, col_width.saturating_sub(1) as usize, color, ); |