diff --git a/crates/radicle-protocol/src/service/command.rs b/crates/radicle-protocol/src/service/command.rs index 4a5f3e5f..b1f12994 100644 --- a/crates/radicle-protocol/src/service/command.rs +++ b/crates/radicle-protocol/src/service/command.rs @@ -13,7 +13,12 @@ use thiserror::Error; use super::ServiceState; /// Function used to query internal service state. -pub type QueryState = dyn Fn(&dyn ServiceState) -> Result<(), Error> + Send + Sync; +pub type QueryState = dyn Fn(&dyn ServiceState) -> Result<()> + Send + Sync; + +/// A result returned from processing a [`Command`]. +/// +/// It is a type synonym for a [`std::result::Result`] +pub type Result = std::result::Result; /// Commands sent to the service by the operator. pub enum Command { @@ -45,7 +50,7 @@ pub enum Command { /// Unfollow the given node. Unfollow(NodeId, Sender), /// Query the internal service state. - QueryState(Arc, Sender>), + QueryState(Arc, Sender>), } impl fmt::Debug for Command {