switch to color_eyre instead of anyhow
This commit is contained in:
@@ -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()))
|
||||
}
|
||||
|
||||
@@ -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")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user