on master help sign in
Address new clippy lints
commit8a602995fa71bee009c0ab1e67b78828a731ca75 authorBlaž Hrastnik <blaz@mxxn.io> dateThu 9 Feb 2023, 11:44 (4 years ago) parente474779
2 files changed+4−3
helix-term/src/commands/typed.rs+3−2 helix-term/src/ui/document.rs+1−1
helix-term/src/commands/typed.rs+3−2
@@ -1,3 +1,4 @@
1+use std::fmt::Write;
12use std::ops::Deref;
23
34use crate::job::Job;
@@ -1103,7 +1104,7 @@ fn get_character_info(
11031104 codepoint
11041105 };
11051106
1106− unicode.push_str(&format!("{codepoint:0>4x}"));
1107+ write!(unicode, "{codepoint:0>4x}").unwrap();
11071108 }
11081109
11091110 unicode.push(')');
@@ -1144,7 +1145,7 @@ fn get_character_info(
11441145 }
11451146
11461147 for byte in &bytes[current_byte..] {
1147− hex.push_str(&format!(" {byte:0>2x}"));
1148+ write!(hex, " {byte:0>2x}").unwrap();
11481149 }
11491150
11501151 current_byte = bytes.len();
helix-term/src/ui/document.rs+1−1
@@ -419,7 +419,7 @@ impl<'a> TextRenderer<'a> {
419419 // TODO special rendering for other whitespaces?
420420 Grapheme::Other { ref g } if g == " " => &self.space,
421421 Grapheme::Other { ref g } if g == "\u{00A0}" => &self.nbsp,
422− Grapheme::Other { ref g } => &*g,
422+ Grapheme::Other { ref g } => g,
423423 Grapheme::Newline => &self.newline,
424424 };
425425