mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-30 09:05:54 +00:00
Fix some clippy warnings
Changes: - Elid lifetimes when possible - Use a slice instead of a Vec as function argument - Rewrite &[b'*''] to b"*"
This commit is contained in:
1 parent
abc20a380c
commit
06ff4b750e
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -445,7 +445,7 @@ impl<'a, Writer: Write> Printer<'a, Writer> {
|
||||
if self.show_position_panel {
|
||||
match self.squeezer {
|
||||
Squeezer::Print => {
|
||||
self.writer.write_all(&[b'*'])?;
|
||||
self.writer.write_all(b"*")?;
|
||||
if self.show_color {
|
||||
self.writer.write_all(COLOR_RESET)?;
|
||||
}
|
||||
@@ -585,7 +585,7 @@ impl<'a, Writer: Write> Printer<'a, Writer> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn reorder_buffer_to_little_endian(&self, buf: &mut Vec<u8>) {
|
||||
fn reorder_buffer_to_little_endian(&self, buf: &mut [u8]) {
|
||||
let n = buf.len();
|
||||
let group_sz = self.group_size as usize;
|
||||
|
||||
|
||||
Reference in new issue
Block a user