Skip to content

Commit

Permalink
Merge pull request #188 from ANSSI-FR/fix-clippy
Browse files Browse the repository at this point in the history
Clippy: clippy::unnecessary_fallible_conversions
  • Loading branch information
commial committed Jan 8, 2024
2 parents 5342417 + d171236 commit 6a5ce37
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions mla/src/lib.rs
@@ -1,5 +1,5 @@
use std::collections::HashMap;
use std::convert::{TryFrom, TryInto};
use std::convert::TryFrom;
use std::io;
use std::io::{Read, Seek, SeekFrom, Write};
#[macro_use]
Expand Down Expand Up @@ -669,10 +669,7 @@ impl<'a, W: InnerWriterTrait> ArchiveWriter<'a, W> {
Error::WrongWriterState("[EndFile] Unable to retrieve the hash".to_string())
})?;
vec_remove_item(ids, &id);
hash.finalize().try_into().map_err(
// Never happens, as hash is a Sha256, to a Sha256Hash
|_| Error::WrongWriterState("[EndFile] Hash with wrong size".to_string()),
)?
hash.finalize().into()
}
_ => {
// Never happens, due to `check_state_file_opened!`
Expand Down

0 comments on commit 6a5ce37

Please sign in to comment.