switch to color_eyre instead of anyhow

This commit is contained in:
Nova
2022-12-02 13:58:54 -05:00
parent 03ccf9127d
commit d7a607a663
29 changed files with 114 additions and 118 deletions

View File

@@ -10,7 +10,7 @@ use crate::{
Node,
},
};
use anyhow::{anyhow, Result};
use color_eyre::eyre::{eyre, Result};
use lazy_static::lazy_static;
use serde::Deserialize;
use stardust_xr::{
@@ -46,7 +46,7 @@ impl EnvironmentItem {
fn get_path_flex(node: &Node, _calling_client: Arc<Client>, _data: &[u8]) -> Result<Vec<u8>> {
let ItemType::Environment(environment_item) = &node.item.get().unwrap().specialization else {
return Err(anyhow!("Wrong item type?"))
return Err(eyre!("Wrong item type?"))
};
Ok(flexbuffers::singleton(environment_item.path.as_str()))
}

View File

@@ -11,7 +11,7 @@ use crate::nodes::alias::AliasInfo;
use crate::nodes::fields::find_field;
#[cfg(feature = "wayland")]
use crate::wayland::panel_item::{PanelItem, ITEM_TYPE_INFO_PANEL};
use anyhow::{anyhow, ensure, Result};
use color_eyre::eyre::{ensure, eyre, Result};
use lazy_static::lazy_static;
use nanoid::nanoid;
use parking_lot::Mutex;
@@ -372,7 +372,7 @@ fn type_info(name: &str) -> Result<&'static TypeInfo> {
"environment" => Ok(&ITEM_TYPE_INFO_ENVIRONMENT),
#[cfg(feature = "wayland")]
"panel" => Ok(&ITEM_TYPE_INFO_PANEL),
_ => Err(anyhow!("Invalid item type")),
_ => Err(eyre!("Invalid item type")),
}
}