Skip to content

Commit

Permalink
meh
Browse files Browse the repository at this point in the history
  • Loading branch information
sokorototo committed Mar 30, 2024
1 parent 4206102 commit 2fd26c8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions vach/src/global/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ impl fmt::Display for ArchiveConfig {
"[ArchiveConfig] magic: {}, has_public_key: {}",
match str::from_utf8(&self.magic) {
Ok(magic) => {
magic
magic.to_string()
},
Err(_) => {
return fmt::Result::Err(fmt::Error);
format!("{:?}", &self.magic)
},
},
has_pk
Expand Down Expand Up @@ -166,9 +166,7 @@ impl Header {
/// ### Errors
/// - `io` errors
pub(crate) fn from_handle<T: Read>(mut handle: T) -> InternalResult<Header> {
#![allow(clippy::uninit_assumed_init)]
let mut buffer: [u8; Header::BASE_SIZE] = [0u8; Header::BASE_SIZE];

handle.read_exact(&mut buffer)?;

// Construct header
Expand Down

0 comments on commit 2fd26c8

Please sign in to comment.