diff --git a/src/object/metadata.rs b/src/object/metadata.rs index 7d7146b20d3..d279b68bb99 100644 --- a/src/object/metadata.rs +++ b/src/object/metadata.rs @@ -399,7 +399,7 @@ flags! { /// /// At user side, we will allow user to query the object metadata. If /// the meta has been stored, we will return directly. If no, we will - /// call `stat` internally to fecth the metadata. + /// call `stat` internally to fetch the metadata. pub enum ObjectMetakey: u64 { /// The special object metadata key that used to mark this object /// already contains all metadata. diff --git a/src/object/object.rs b/src/object/object.rs index 42bfb5293d9..cbcb9d96e30 100644 --- a/src/object/object.rs +++ b/src/object/object.rs @@ -301,7 +301,7 @@ impl Object { /// /// # Notes /// - /// - The returning contnet's length may be smaller than the range specified. + /// - The returning content's length may be smaller than the range specified. /// /// # Examples /// @@ -445,7 +445,7 @@ impl Object { /// /// # Notes /// - /// - The returning contnet's length may be smaller than the range specified. + /// - The returning content's length may be smaller than the range specified. /// /// # Examples /// diff --git a/src/object/writer.rs b/src/object/writer.rs index 69704fe15d0..5def62bb101 100644 --- a/src/object/writer.rs +++ b/src/object/writer.rs @@ -153,7 +153,7 @@ impl AsyncWrite for ObjectWriter { self.state = State::Close(Box::pin(fut)); } State::Write(_) => { - unreachable!("invlia state of writer: poll_close with State::Write") + unreachable!("invalid state of writer: poll_close with State::Write") } State::Close(fut) => match ready!(fut.poll_unpin(cx)) { Ok(w) => { diff --git a/src/raw/accessor.rs b/src/raw/accessor.rs index cca25931469..de19d94a877 100644 --- a/src/raw/accessor.rs +++ b/src/raw/accessor.rs @@ -101,7 +101,7 @@ pub trait Accessor: Send + Sync + Debug + Unpin + 'static { /// # Behavior /// /// - Input path MUST be file path, DON'T NEED to check object mode. - /// - The returning contnet length may be smaller than the range specified. + /// - The returning content length may be smaller than the range specified. async fn read(&self, path: &str, args: OpRead) -> Result<(RpRead, Self::Reader)> { let (_, _) = (path, args); diff --git a/src/raw/http_util/bytes_content_range.rs b/src/raw/http_util/bytes_content_range.rs index 92e49131c56..36b2462912d 100644 --- a/src/raw/http_util/bytes_content_range.rs +++ b/src/raw/http_util/bytes_content_range.rs @@ -44,7 +44,7 @@ use crate::Result; /// /// BytesContentRange implements `len()` but not `is_empty()` because it's useless. /// - When BytesContentRange's range is known, it must be non-empty. -/// - When BytesContentRange's range is no known, we don't know whethre it's empty. +/// - When BytesContentRange's range is no known, we don't know whether it's empty. #[allow(clippy::len_without_is_empty)] #[derive(Debug, Default, Clone, Copy, Eq, PartialEq, serde::Serialize, serde::Deserialize)] pub struct BytesContentRange( diff --git a/src/raw/http_util/dns.rs b/src/raw/http_util/dns.rs index e843d5ee2ff..3819748d4ba 100644 --- a/src/raw/http_util/dns.rs +++ b/src/raw/http_util/dns.rs @@ -218,7 +218,7 @@ impl DnsCache { // entire cache to make more space. // // As described in DnsCache's doc, this limit should never be reached. - // We expect there only few entries holded in cache. + // We expect there only few entries held in cache. if guard.len() >= self.limits { guard.clear() } diff --git a/src/raw/oio/into_reader/by_range.rs b/src/raw/oio/into_reader/by_range.rs index 5de80f84510..67cc7db0fcb 100644 --- a/src/raw/oio/into_reader/by_range.rs +++ b/src/raw/oio/into_reader/by_range.rs @@ -192,7 +192,7 @@ impl oio::Read for RangeReader { // TODO: make this value configurable if seek_pos > self.cur && seek_pos - self.cur < 1024 * 1024 { // 212992 is the default read mem buffer of archlinux. - // Ideally we should make this congiurable. + // Ideally we should make this configurable. // // TODO: make this value configurable let consume = cmp::min((seek_pos - self.cur) as usize, 212992); diff --git a/src/raw/oio/into_streamable.rs b/src/raw/oio/into_streamable.rs index 1226d237807..a2b50e1b316 100644 --- a/src/raw/oio/into_streamable.rs +++ b/src/raw/oio/into_streamable.rs @@ -121,7 +121,7 @@ mod tests { } #[test] - fn test_into_stream_blocing() { + fn test_into_stream_blocking() { use oio::BlockingRead; let mut rng = ThreadRng::default(); diff --git a/src/raw/oio/read.rs b/src/raw/oio/read.rs index 67320509a6c..80375932f66 100644 --- a/src/raw/oio/read.rs +++ b/src/raw/oio/read.rs @@ -130,7 +130,7 @@ impl Read for () { } } -/// `Box` won't implement `Read` automanticly. To make Reader +/// `Box` won't implement `Read` automatically. To make Reader /// work as expected, we must add this impl. impl Read for Box { fn poll_read(&mut self, cx: &mut Context<'_>, buf: &mut [u8]) -> Poll> { @@ -327,7 +327,7 @@ impl BlockingRead for () { } } -/// `Box` won't implement `BlockingRead` automanticly. +/// `Box` won't implement `BlockingRead` automatically. /// To make BlockingReader work as expected, we must add this impl. impl BlockingRead for Box { fn read(&mut self, buf: &mut [u8]) -> Result { diff --git a/src/raw/oio/to_hierarchy_pager.rs b/src/raw/oio/to_hierarchy_pager.rs index 4d738ae6619..8a1de6e4cd0 100644 --- a/src/raw/oio/to_hierarchy_pager.rs +++ b/src/raw/oio/to_hierarchy_pager.rs @@ -39,7 +39,7 @@ pub fn to_hierarchy_pager

(pager: P, path: &str) -> ToHierarchyPager

{ /// /// # Notes /// -/// ToHierarchyPager filter entries after fecth entries. So it's possible +/// ToHierarchyPager filter entries after fetch entries. So it's possible /// to return an empty vec. It doesn't mean the all pages have been /// returned. /// @@ -58,7 +58,7 @@ impl

ToHierarchyPager

{ .filter_map(|mut e| { // If path is not started with prefix, drop it. // - // Idealy, it should never happen. But we just tolerate + // Ideally, it should never happen. But we just tolerate // this state. if !e.path().starts_with(&self.path) { return None; diff --git a/src/raw/oio/write.rs b/src/raw/oio/write.rs index 93fb279c87a..bd1ffed2e35 100644 --- a/src/raw/oio/write.rs +++ b/src/raw/oio/write.rs @@ -113,7 +113,7 @@ impl Write for () { } } -/// `Box` won't implement `Write` automanticly. To make Writer +/// `Box` won't implement `Write` automatically. To make Writer /// work as expected, we must add this impl. #[async_trait] impl Write for Box { @@ -169,7 +169,7 @@ impl BlockingWrite for () { } } -/// `Box` won't implement `BlockingWrite` automanticly. +/// `Box` won't implement `BlockingWrite` automatically. /// To make BlockingWriter work as expected, we must add this impl. impl BlockingWrite for Box { fn write(&mut self, bs: Bytes) -> Result<()> { diff --git a/src/raw/rps.rs b/src/raw/rps.rs index 8f4bcaf414d..978a15c960c 100644 --- a/src/raw/rps.rs +++ b/src/raw/rps.rs @@ -149,7 +149,7 @@ impl RpBatch { } } -/// Batch results of `bacth` operations. +/// Batch results of `batch` operations. pub enum BatchedResults { /// results of delete batch operation Delete(Vec<(String, Result)>), diff --git a/src/services/fs/backend.rs b/src/services/fs/backend.rs index 51f9037e382..bb345b15d61 100644 --- a/src/services/fs/backend.rs +++ b/src/services/fs/backend.rs @@ -117,7 +117,7 @@ impl FsBuilder { /// behavior is consistent. By enable path check, we can make sure /// fs will behave the same as other services. /// - /// Enabling this feature will lead to etra metadata call in all + /// Enabling this feature will lead to extra metadata call in all /// operations. pub fn enable_path_check(&mut self) -> &mut Self { self.enable_path_check = true; diff --git a/src/services/gcs/backend.rs b/src/services/gcs/backend.rs index 5d84c411503..68527fdcc2b 100644 --- a/src/services/gcs/backend.rs +++ b/src/services/gcs/backend.rs @@ -152,7 +152,7 @@ impl GcsBuilder { /// Set the GCS service account. /// /// service account will be used for fetch token from vm metadata. - /// If not set, we will try to fecth with `default` service account. + /// If not set, we will try to fetch with `default` service account. pub fn service_account(&mut self, service_account: &str) -> &mut Self { if !service_account.is_empty() { self.service_account = Some(service_account.to_string()) @@ -195,7 +195,7 @@ impl GcsBuilder { self } - /// Specify the signer directly instead of builling by OpenDAL. + /// Specify the signer directly instead of building by OpenDAL. /// /// If signer is specified, the following settings will not be used /// any more: @@ -648,7 +648,7 @@ struct GetObjectJsonResponse { md5_hash: String, /// Content type of this object. /// - /// For examlpe: `"contentType": "image/png",` + /// For example: `"contentType": "image/png",` content_type: String, } diff --git a/src/services/moka/backend.rs b/src/services/moka/backend.rs index 3883596b2a0..2316fd5d725 100644 --- a/src/services/moka/backend.rs +++ b/src/services/moka/backend.rs @@ -152,7 +152,7 @@ impl Builder for MokaBuilder { let mut builder: CacheBuilder, _> = SegmentedCache::builder(self.num_segments.unwrap_or(1)) .thread_pool_enabled(self.thread_pool_enabled.unwrap_or(false)); - // Use entries's bytes as capacity weigher. + // Use entries' bytes as capacity weigher. builder = builder.weigher(|k, v| (k.len() + v.len()) as u32); if let Some(v) = &self.name { builder = builder.name(v);