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

@ -7,7 +7,6 @@ use std::fmt::{Display, Formatter};
use std::num::ParseIntError;
use std::path::StripPrefixError;
use xenclient::XenClientError;
use xenstore::bus::XsdBusError;
pub type Result<T> = std::result::Result<T, HyphaError>;
@ -117,8 +116,8 @@ impl From<uuid::Error> for HyphaError {
}
}
impl From<XsdBusError> for HyphaError {
fn from(value: XsdBusError) -> Self {
impl From<xenstore::error::Error> for HyphaError {
fn from(value: xenstore::error::Error) -> Self {
HyphaError::new(value.to_string().as_str())
}
}