On Wed, Aug 27, 2025 at 02:41:28PM +0400, marcandre.lur...@redhat.com wrote: > Date: Wed, 27 Aug 2025 14:41:28 +0400 > From: marcandre.lur...@redhat.com > Subject: [PATCH 06/22] rust: split "util" crate > > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> > ---
... > diff --git a/rust/common/src/errno.rs b/rust/common/src/errno.rs > index b48247b947..a7b23b4092 100644 > --- a/rust/common/src/errno.rs > +++ b/rust/common/src/errno.rs > @@ -240,7 +240,7 @@ pub fn into_neg_errno<T: MergeErrno, E: > Into<Errno>>(value: Result<T, E>) -> T:: > mod tests { > use std::io::ErrorKind; > > - use common::assert_match; > + use bindings::assert_match; typo? > use super::*; > ... > diff --git a/rust/qemu-api/src/error.rs b/rust/util/src/error.rs > similarity index 98% > rename from rust/qemu-api/src/error.rs > rename to rust/util/src/error.rs > index 8bac3cbec8..a1b11a97ca 100644 > --- a/rust/qemu-api/src/error.rs > +++ b/rust/util/src/error.rs > @@ -19,7 +19,7 @@ > //! > //! This module is most commonly used at the boundary between C and Rust > code; > //! other code will usually access it through the > -//! [`qemu_api::Result`](crate::Result) type alias, and will use the > +//! [`utils::Result`](crate::Result) type alias, and will use the > //! [`std::error::Error`] interface to let C errors participate in Rust's > error > //! handling functionality. > //! > @@ -30,7 +30,7 @@ > //! type up to C code, or from a combination of the two. > //! > //! The third case, corresponding to [`Error::with_error`], is the only one > that > -//! requires mentioning [`qemu_api::Error`](crate::Error) explicitly. > Similar > +//! requires mentioning [`utils::Error`](crate::Error) explicitly. Similar > //! to how QEMU's C code handles errno values, the string and the > //! `anyhow::Error` object will be concatenated with `:` as the separator. > > @@ -316,11 +316,10 @@ mod tests { > use std::ffi::CStr; > > use anyhow::anyhow; > - use common::assert_match; > + use bindings::assert_match; typo? With fixed, Reviewed-by: Zhao Liu <zhao1....@intel.com>