From 7f28693765a57b448ef4f1fd1e9e2450b648909d Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Wed, 7 Feb 2024 10:07:01 +0800 Subject: [PATCH] Fix name DtraceLayerWrapper --- core/src/layers/dtrace.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/core/src/layers/dtrace.rs b/core/src/layers/dtrace.rs index 0eb0ce02f60f..0b794cac7e39 100644 --- a/core/src/layers/dtrace.rs +++ b/core/src/layers/dtrace.rs @@ -194,10 +194,10 @@ impl Debug for DTraceAccessor { #[async_trait] impl LayeredAccessor for DTraceAccessor { type Inner = A; - type Reader = DtraceLayerWarpper; - type BlockingReader = DtraceLayerWarpper; - type Writer = DtraceLayerWarpper; - type BlockingWriter = DtraceLayerWarpper; + type Reader = DtraceLayerWrapper; + type BlockingReader = DtraceLayerWrapper; + type Writer = DtraceLayerWrapper; + type BlockingWriter = DtraceLayerWrapper; type Lister = A::Lister; type BlockingLister = A::BlockingLister; @@ -220,7 +220,7 @@ impl LayeredAccessor for DTraceAccessor { .inner .read(path, args) .await - .map(|(rp, r)| (rp, DtraceLayerWarpper::new(r, &path.to_string()))); + .map(|(rp, r)| (rp, DtraceLayerWrapper::new(r, &path.to_string()))); probe_lazy!(opendal, read_end, c_path.as_ptr()); result } @@ -232,7 +232,7 @@ impl LayeredAccessor for DTraceAccessor { .inner .write(path, args) .await - .map(|(rp, r)| (rp, DtraceLayerWarpper::new(r, &path.to_string()))); + .map(|(rp, r)| (rp, DtraceLayerWrapper::new(r, &path.to_string()))); probe_lazy!(opendal, write_end, c_path.as_ptr()); result @@ -288,7 +288,7 @@ impl LayeredAccessor for DTraceAccessor { let result = self .inner .blocking_read(path, args) - .map(|(rp, r)| (rp, DtraceLayerWarpper::new(r, &path.to_string()))); + .map(|(rp, r)| (rp, DtraceLayerWrapper::new(r, &path.to_string()))); probe_lazy!(opendal, blocking_read_end, c_path.as_ptr()); result } @@ -299,7 +299,7 @@ impl LayeredAccessor for DTraceAccessor { let result = self .inner .blocking_write(path, args) - .map(|(rp, r)| (rp, DtraceLayerWarpper::new(r, &path.to_string()))); + .map(|(rp, r)| (rp, DtraceLayerWrapper::new(r, &path.to_string()))); probe_lazy!(opendal, blocking_write_end, c_path.as_ptr()); result } @@ -329,12 +329,12 @@ impl LayeredAccessor for DTraceAccessor { } } -pub struct DtraceLayerWarpper { +pub struct DtraceLayerWrapper { inner: R, path: String, } -impl DtraceLayerWarpper { +impl DtraceLayerWrapper { pub fn new(inner: R, path: &String) -> Self { Self { inner, @@ -343,7 +343,7 @@ impl DtraceLayerWarpper { } } -impl oio::Read for DtraceLayerWarpper { +impl oio::Read for DtraceLayerWrapper { fn poll_read(&mut self, cx: &mut Context<'_>, buf: &mut [u8]) -> Poll> { let c_path = CString::new(self.path.clone()).unwrap(); probe_lazy!(opendal, reader_read_start, c_path.as_ptr()); @@ -393,7 +393,7 @@ impl oio::Read for DtraceLayerWarpper { } } -impl oio::BlockingRead for DtraceLayerWarpper { +impl oio::BlockingRead for DtraceLayerWrapper { fn read(&mut self, buf: &mut [u8]) -> Result { let c_path = CString::new(self.path.clone()).unwrap(); probe_lazy!(opendal, blocking_reader_read_start, c_path.as_ptr()); @@ -445,7 +445,7 @@ impl oio::BlockingRead for DtraceLayerWarpper { } } -impl oio::Write for DtraceLayerWarpper { +impl oio::Write for DtraceLayerWrapper { fn poll_write(&mut self, cx: &mut Context<'_>, bs: &dyn oio::WriteBuf) -> Poll> { let c_path = CString::new(self.path.clone()).unwrap(); probe_lazy!(opendal, writer_write_start, c_path.as_ptr()); @@ -490,7 +490,7 @@ impl oio::Write for DtraceLayerWarpper { } } -impl oio::BlockingWrite for DtraceLayerWarpper { +impl oio::BlockingWrite for DtraceLayerWrapper { fn write(&mut self, bs: &dyn oio::WriteBuf) -> Result { let c_path = CString::new(self.path.clone()).unwrap(); probe_lazy!(opendal, blocking_writer_write_start, c_path.as_ptr());