Skip to content

Commit

Permalink
Use TryFutureExt::map_err
Browse files Browse the repository at this point in the history
  • Loading branch information
david-perez committed Apr 19, 2023
1 parent 67c451c commit e61ed46
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,10 @@ class ServerHttpBoundProtocolTraitImplGenerator(
.await
.map_err(Into::into)
};
use #{FuturesUtil}::future::FutureExt;
let fut = fut.map(|res| {
res.map_err(|e: #{RequestRejection}| {
#{Tracing}::error!(error = %e, "failed to deserialize request");
#{RuntimeError}::from(e)
})
use #{FuturesUtil}::future::TryFutureExt;
let fut = fut.map_err(|e: #{RequestRejection}| {
#{Tracing}::error!(error = %e, "failed to deserialize request");
#{RuntimeError}::from(e)
});
$inputFuture {
inner: Box::pin(fut)
Expand Down

0 comments on commit e61ed46

Please sign in to comment.