From a9fbfcc7ae169bf6c776eb7263323563a321a1c7 Mon Sep 17 00:00:00 2001 From: Jakob Naucke Date: Fri, 31 Jan 2025 18:05:50 +0100 Subject: [PATCH] rust/pv_core: Fix error type of misc::read_file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was Write, should be Read. Fixes: 9b51b8b88202 ("rust/pv: Refactor pv crate") Signed-off-by: Jakob Naucke Reviewed-by: Marc Hartmayer Reviewed-by: Steffen Eiden Signed-off-by: Jan Höppner --- rust/pv_core/src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/pv_core/src/utils.rs b/rust/pv_core/src/utils.rs index 08758e14..b5331d1e 100644 --- a/rust/pv_core/src/utils.rs +++ b/rust/pv_core/src/utils.rs @@ -296,7 +296,7 @@ pub fn read_file>(path: P, ctx: &str) -> Result> { pub fn read>(rd: &mut R, path: P, ctx: &str) -> Result> { let mut buf = vec![]; rd.read_to_end(&mut buf).map_err(|e| Error::FileIo { - ty: FileIoErrorType::Write, + ty: FileIoErrorType::Read, ctx: ctx.to_string(), path: path.as_ref().to_path_buf(), source: e,