From d171236348f3bd7f774c7c0d643adf4c1b578e8a Mon Sep 17 00:00:00 2001 From: Camille Mougey Date: Mon, 8 Jan 2024 09:50:12 +0100 Subject: [PATCH] Clippy: clippy::unnecessary_fallible_conversions --- mla/src/lib.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mla/src/lib.rs b/mla/src/lib.rs index 55d275a..423a055 100644 --- a/mla/src/lib.rs +++ b/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] @@ -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!`