This is an automated email from the ASF dual-hosted git repository.

Xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 6d6ee65067 chore(core): fix stale safety/doc comments and typos (#8919)
6d6ee65067 is described below

commit 6d6ee65067aeb9c4a4c957878cbc276884fa61f0
Author: Xuanwo <[email protected]>
AuthorDate: Tue Nov 24 03:11:43 2026 +0800

    chore(core): fix stale safety/doc comments and typos (#8919)
---
 core/core/src/raw/oio/list/prefix_list.rs        |  4 ++--
 core/core/src/types/context/read.rs              |  4 ++--
 core/core/src/types/read/futures_bytes_stream.rs | 12 +++++++-----
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/core/core/src/raw/oio/list/prefix_list.rs 
b/core/core/src/raw/oio/list/prefix_list.rs
index a5e25d6636..ad8b9d4c06 100644
--- a/core/core/src/raw/oio/list/prefix_list.rs
+++ b/core/core/src/raw/oio/list/prefix_list.rs
@@ -36,11 +36,11 @@ pub struct PrefixLister<L> {
 
 /// # Safety
 ///
-/// We will only take `&mut Self` reference for FsLister.
+/// We will only take `&mut Self` reference for PrefixLister.
 unsafe impl<L> Sync for PrefixLister<L> {}
 
 impl<L> PrefixLister<L> {
-    /// Create a new flat lister
+    /// Create a new prefix lister.
     pub fn new(lister: L, prefix: &str) -> PrefixLister<L> {
         PrefixLister {
             lister,
diff --git a/core/core/src/types/context/read.rs 
b/core/core/src/types/context/read.rs
index b6a3c125c7..b7b0f8fc12 100644
--- a/core/core/src/types/context/read.rs
+++ b/core/core/src/types/context/read.rs
@@ -22,7 +22,7 @@ use crate::raw::oio::Read as _;
 use crate::raw::*;
 use crate::*;
 
-/// ReadContext holds the immutable context for give read operation.
+/// ReadContext holds the immutable context for a given read operation.
 pub struct ReadContext {
     /// The composed context used to execute operations.
     ctx: OperationContext,
@@ -34,7 +34,7 @@ pub struct ReadContext {
     args: OpRead,
     /// Options for the reader.
     options: OpReader,
-    /// Raw reader returned by [`Access::read`].
+    /// Raw reader returned by [`Service::read`].
     reader: oio::Reader,
     /// Complete object metadata observed from successful read opens.
     metadata: OnceLock<Metadata>,
diff --git a/core/core/src/types/read/futures_bytes_stream.rs 
b/core/core/src/types/read/futures_bytes_stream.rs
index f7727d38a9..f6bc3c1465 100644
--- a/core/core/src/types/read/futures_bytes_stream.rs
+++ b/core/core/src/types/read/futures_bytes_stream.rs
@@ -32,19 +32,21 @@ use crate::*;
 /// FuturesBytesStream is the adapter of [`Stream`] generated by 
[`Reader::into_bytes_stream`].
 ///
 /// Users can use this adapter in cases where they need to use [`Stream`] 
trait. FuturesBytesStream
-/// reuses the same concurrent adand chunk settings from [`Reader`].
-///ad
-/// FuturesStream also implements [`Unpin`], [`Send`] and [`Sync`].
+/// reuses the same concurrent and chunk settings from [`Reader`].
+///
+/// FuturesBytesStream also implements [`Unpin`], [`Send`] and [`Sync`].
 pub struct FuturesBytesStream {
     stream: BufferStream,
     buf: Buffer,
 }
 
-/// Safety: FuturesBytesStream only exposes `&mut self` to the outside world,
+/// # Safety
+///
+/// `FuturesBytesStream` only exposes `&mut self` to the outside world, so 
it's safe to be `Sync`.
 unsafe impl Sync for FuturesBytesStream {}
 
 impl FuturesBytesStream {
-    /// NOTE: don't allow users to create FuturesStream directly.
+    /// NOTE: don't allow users to create FuturesBytesStream directly.
     pub(crate) async fn new(ctx: Arc<ReadContext>, range: impl 
Into<BytesRange>) -> Result<Self> {
         let stream = BufferStream::create(ctx, range, None).await?;
 

Reply via email to