Skip to content
Snippets Groups Projects
Commit 9aacf61a authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

feat(error): Error::other constructor

parent 27098d15
No related branches found
No related tags found
1 merge request!259feat(network): arbitrary sync/async rpc requests
......@@ -35,6 +35,15 @@ pub enum Error {
Other(Box<dyn std::error::Error>),
}
impl Error {
pub fn other<E>(error: E) -> Self
where
E: Into<Box<dyn std::error::Error>>,
{
Self::Other(error.into())
}
}
#[derive(Debug, Error)]
pub enum CoercionError {
#[error("unknown entry type ({0})")]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment