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

Xuanwo pushed a commit to branch xuanwo/chore-fix-core-stale-comments-and-typos
in repository https://gitbox.apache.org/repos/asf/opendal.git

commit 88a2d7da7b29ca4fc4fe416a3e503ad553b72d45
Author: Xuanwo <[email protected]>
AuthorDate: Mon Nov 23 16:51:59 2026 +0100

    chore(core): fix stale safety/doc comments and typos
---
 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 66a696efa0..519488e4f1 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