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

This commit is contained in:
Alex Zenla committed 2024-01-30 01:58:10 -08:00
1 parent 812e357bc9
commit eba623d61a
8 files changed
+95 -112

No files matched your search

+2 -3
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())
}
}