On Fri, Oct 31, 2025 at 04:25:37PM +0100, Paolo Bonzini wrote: > Date: Fri, 31 Oct 2025 16:25:37 +0100 > From: Paolo Bonzini <[email protected]> > Subject: [PATCH 2/4] rust/util: use anyhow's native chaining capabilities > X-Mailer: git-send-email 2.51.1 > > This simplifies conversions, making it possible to convert any error > into a QEMU util::Error with ".into()" (and therefore with "?"). > > The cost is having a separate constructor for when the error is a simple > string, but that is made easier by the ensure! macro. If necessary, > another macro similar to "anyhow!" can be returned, but for now there > is no need for that. > > Signed-off-by: Paolo Bonzini <[email protected]> > --- > rust/util/src/error.rs | 160 +++++++++++++++-------------------------- > 1 file changed, 59 insertions(+), 101 deletions(-)
LGTM, Reviewed-by: Zhao Liu <[email protected]>
