diff options
author | Blaž Hrastnik | 2023-02-09 02:44:14 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-02-09 02:44:14 +0000 |
commit | 8a602995fa71bee009c0ab1e67b78828a731ca75 (patch) | |
tree | 3874c7953d5ca4cf56d5220c1269dcb0a572eb1d | |
parent | e474779c8729c36335b76badc98d8211829122d2 (diff) |
Address new clippy lints
-rw-r--r-- | helix-term/src/commands/typed.rs | 5 | ||||
-rw-r--r-- | helix-term/src/ui/document.rs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 1fd11b65..0cc1b743 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -1,3 +1,4 @@ +use std::fmt::Write; use std::ops::Deref; use crate::job::Job; @@ -1103,7 +1104,7 @@ fn get_character_info( codepoint }; - unicode.push_str(&format!("{codepoint:0>4x}")); + write!(unicode, "{codepoint:0>4x}").unwrap(); } unicode.push(')'); @@ -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(); diff --git a/helix-term/src/ui/document.rs b/helix-term/src/ui/document.rs index 56377d1e..ddbb2cf3 100644 --- a/helix-term/src/ui/document.rs +++ b/helix-term/src/ui/document.rs @@ -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, }; |