xenstore: move error type and make use of result type aliases

This commit is contained in:
Alex Zenla
2024-01-30 01:58:10 -08:00
parent 812e357bc9
commit eba623d61a
8 changed files with 95 additions and 112 deletions

View File

@ -20,7 +20,6 @@ use uuid::Uuid;
use xencall::sys::CreateDomain;
use xencall::{XenCall, XenCallError};
use xenevtchn::EventChannelError;
use xenstore::bus::XsdBusError;
use xenstore::client::{
XsPermission, XsdClient, XsdInterface, XS_PERM_NONE, XS_PERM_READ, XS_PERM_READ_WRITE,
};
@ -61,8 +60,8 @@ impl From<std::io::Error> for XenClientError {
}
}
impl From<XsdBusError> for XenClientError {
fn from(value: XsdBusError) -> Self {
impl From<xenstore::error::Error> for XenClientError {
fn from(value: xenstore::error::Error) -> Self {
XenClientError::new(value.to_string().as_str())
}
}