Skip to content

Commit

Permalink
Address new clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Feb 9, 2023
1 parent e474779 commit 8a60299
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions helix-term/src/commands/typed.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::fmt::Write;
use std::ops::Deref;

use crate::job::Job;
Expand Down Expand Up @@ -1103,7 +1104,7 @@ fn get_character_info(
codepoint
};

unicode.push_str(&format!("{codepoint:0>4x}"));
write!(unicode, "{codepoint:0>4x}").unwrap();
}

unicode.push(')');
Expand Down Expand Up @@ -1144,7 +1145,7 @@ fn get_character_info(
}

for byte in &bytes[current_byte..] {
hex.push_str(&format!(" {byte:0>2x}"));
write!(hex, " {byte:0>2x}").unwrap();
}

current_byte = bytes.len();
Expand Down
2 changes: 1 addition & 1 deletion helix-term/src/ui/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ impl<'a> TextRenderer<'a> {
// TODO special rendering for other whitespaces?
Grapheme::Other { ref g } if g == " " => &self.space,
Grapheme::Other { ref g } if g == "\u{00A0}" => &self.nbsp,
Grapheme::Other { ref g } => &*g,
Grapheme::Other { ref g } => g,
Grapheme::Newline => &self.newline,
};

Expand Down

0 comments on commit 8a60299

Please sign in to comment.