fix(error): use anyhow error instead of formatting
This commit is contained in:
@@ -87,9 +87,7 @@ impl<'a> Node<'a> {
|
|||||||
.local_signals
|
.local_signals
|
||||||
.get(method)
|
.get(method)
|
||||||
.ok_or(ScenegraphError::SignalNotFound)?;
|
.ok_or(ScenegraphError::SignalNotFound)?;
|
||||||
signal(self, calling_client, data).map_err(|err| ScenegraphError::SignalError {
|
signal(self, calling_client, data).map_err(|error| ScenegraphError::SignalError { error })
|
||||||
error: format!("{}", err),
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
pub fn execute_local_method(
|
pub fn execute_local_method(
|
||||||
&self,
|
&self,
|
||||||
@@ -101,9 +99,7 @@ impl<'a> Node<'a> {
|
|||||||
.local_methods
|
.local_methods
|
||||||
.get(method)
|
.get(method)
|
||||||
.ok_or(ScenegraphError::MethodNotFound)?;
|
.ok_or(ScenegraphError::MethodNotFound)?;
|
||||||
method(self, calling_client, data).map_err(|err| ScenegraphError::MethodError {
|
method(self, calling_client, data).map_err(|error| ScenegraphError::MethodError { error })
|
||||||
error: format!("{}", err),
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
// pub fn send_remote_signal(&self, method: &str, data: &[u8]) -> Result<()> {
|
// pub fn send_remote_signal(&self, method: &str, data: &[u8]) -> Result<()> {
|
||||||
// self.get_client()
|
// self.get_client()
|
||||||
|
|||||||
Reference in New Issue
Block a user