Skip to content

Commit

Permalink
feat: make cargo fmt happy
Browse files Browse the repository at this point in the history
Signed-off-by: Chojan Shang <[email protected]>
  • Loading branch information
PsiACE committed Jun 23, 2024
1 parent 804f9c7 commit 0cfd9cf
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions core/src/layers/async_backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ impl<A: Access> LayeredAccess for AsyncBacktraceAccessor<A> {

#[async_backtrace::framed]
async fn write(&self, path: &str, args: OpWrite) -> Result<(RpWrite, Self::Writer)> {
self.inner.write(path, args)
.map(|v| v.map(|(rp, r)| (rp, AsyncBacktraceWrapper::new(r))))
.await
self.inner
.write(path, args)
.map(|v| v.map(|(rp, r)| (rp, AsyncBacktraceWrapper::new(r))))
.await
}

#[async_backtrace::framed]
Expand All @@ -108,9 +109,10 @@ impl<A: Access> LayeredAccess for AsyncBacktraceAccessor<A> {

#[async_backtrace::framed]
async fn list(&self, path: &str, args: OpList) -> Result<(RpList, Self::Lister)> {
self.inner.list(path, args)
.map(|v| v.map(|(rp, r)| (rp, AsyncBacktraceWrapper::new(r))))
.await
self.inner
.list(path, args)
.map(|v| v.map(|(rp, r)| (rp, AsyncBacktraceWrapper::new(r))))
.await
}

#[async_backtrace::framed]
Expand All @@ -124,15 +126,21 @@ impl<A: Access> LayeredAccess for AsyncBacktraceAccessor<A> {
}

fn blocking_read(&self, path: &str, args: OpRead) -> Result<(RpRead, Self::BlockingReader)> {
self.inner.blocking_read(path, args).map(|(rp, r)| (rp, AsyncBacktraceWrapper::new(r)))
self.inner
.blocking_read(path, args)
.map(|(rp, r)| (rp, AsyncBacktraceWrapper::new(r)))
}

fn blocking_write(&self, path: &str, args: OpWrite) -> Result<(RpWrite, Self::BlockingWriter)> {
self.inner.blocking_write(path, args).map(|(rp, r)| (rp, AsyncBacktraceWrapper::new(r)))
self.inner
.blocking_write(path, args)
.map(|(rp, r)| (rp, AsyncBacktraceWrapper::new(r)))
}

fn blocking_list(&self, path: &str, args: OpList) -> Result<(RpList, Self::BlockingLister)> {
self.inner.blocking_list(path, args).map(|(rp, r)| (rp, AsyncBacktraceWrapper::new(r)))
self.inner
.blocking_list(path, args)
.map(|(rp, r)| (rp, AsyncBacktraceWrapper::new(r)))
}
}

Expand Down

0 comments on commit 0cfd9cf

Please sign in to comment.