From 5db92f79bf24c44c7db636c9f73b95a35d76592f Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Mon, 19 May 2025 09:46:53 +0200 Subject: [PATCH] misc: arch: streamline #[source] and Error This streamlines the code base to follow best practices for error handling in Rust: Each error struct implements std::error::Error (most due via thiserror::Error derive macro) and sets its source accordingly. This allows future work that nicely prints the error chains, for example. So far, the convention is that each error prints its sub error as part of its Display::fmt() impl. Signed-off-by: Philipp Schuster On-behalf-of: SAP philipp.schuster@sap.com --- arch/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/src/lib.rs b/arch/src/lib.rs index 88eb1af9b..38d258859 100644 --- a/arch/src/lib.rs +++ b/arch/src/lib.rs @@ -28,14 +28,14 @@ type GuestRegionMmap = vm_memory::GuestRegionMmap