Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hansieodendaal committed Sep 21, 2023
1 parent 36233a0 commit 6475ef7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions base_layer/service_framework/src/reply_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ pub struct RequestContext<TReq, TResp> {
impl<TReq, TResp> RequestContext<TReq, TResp> {
/// Create a new RequestContect
pub fn new(request: TReq, reply_tx: oneshot::Sender<TResp>) -> Self {
Self {
request,
reply_tx,
}
Self { request, reply_tx }
}

/// Return a reference to the request object. None is returned after take_request has
Expand All @@ -152,10 +149,7 @@ impl<TReq, TResp> RequestContext<TReq, TResp> {
/// Consume this object and return it's parts. Namely, the request object and
/// the reply oneshot channel.
pub fn split(self) -> (TReq, oneshot::Sender<TResp>) {
(
self.request,
self.reply_tx,
)
(self.request, self.reply_tx)
}

/// Sends a reply to the caller
Expand Down

0 comments on commit 6475ef7

Please sign in to comment.