diff --git a/src/docs/rfcs/0429_init_from_iter.md b/src/docs/rfcs/0429_init_from_iter.md index 05a767b3ad4..c312cc2131b 100644 --- a/src/docs/rfcs/0429_init_from_iter.md +++ b/src/docs/rfcs/0429_init_from_iter.md @@ -5,7 +5,7 @@ # Summary -Allow initing opendal operators from an iterator. +Allow initializing opendal operators from an iterator. # Motivation diff --git a/src/docs/rfcs/0977_refactor_error.md b/src/docs/rfcs/0977_refactor_error.md index 51aee07457a..e8560e19dc5 100644 --- a/src/docs/rfcs/0977_refactor_error.md +++ b/src/docs/rfcs/0977_refactor_error.md @@ -27,7 +27,7 @@ struct PermanentError { `std::io::ErrorKind` is used to represent errors returned from system io, which is unsuitable for mistakes that have business semantics. For example, users can't distinguish `ObjectNotFound` or `BucketNotFound` from `ErrorKind::NotFound`. -## ErrorKind is incompelete +## ErrorKind is incomplete OpenDAL has been waiting for features [`io_error_more`](https://github.com/rust-lang/rust/issues/86442) to be stabilized for a long time. But there is no progress so far, which makes it impossible to return `ErrorKind::IsADirectory` or `ErrorKind::NotADirectory` on stable rust. diff --git a/src/docs/rfcs/1391_object_metadataer.md b/src/docs/rfcs/1391_object_metadataer.md index 788445b0d03..0957dde1d2f 100644 --- a/src/docs/rfcs/1391_object_metadataer.md +++ b/src/docs/rfcs/1391_object_metadataer.md @@ -5,7 +5,7 @@ # Summary -Add object metadataer to avoid unneed extra metadata call. +Add object metadataer to avoid unneeded extra metadata call. # Motivation diff --git a/src/docs/rfcs/1398_query_based_metadata.md b/src/docs/rfcs/1398_query_based_metadata.md index 149a3c28270..1372c99ee3e 100644 --- a/src/docs/rfcs/1398_query_based_metadata.md +++ b/src/docs/rfcs/1398_query_based_metadata.md @@ -106,7 +106,7 @@ pub async fn metadata( ## Breaking changes -After this RFC, `Object::metadata()` will accept a query. And all exisintg users need to adapt their code for that. +After this RFC, `Object::metadata()` will accept a query. And all existing users need to adapt their code for that. # Rationale and alternatives diff --git a/src/docs/rfcs/1420_object_writer.md b/src/docs/rfcs/1420_object_writer.md index 24d3b6037f4..29ca7d4b8cd 100644 --- a/src/docs/rfcs/1420_object_writer.md +++ b/src/docs/rfcs/1420_object_writer.md @@ -12,7 +12,7 @@ Adding `ObjectWriter` to improve support for multipart uploads, as well as enabl OpenDAL works well for `read` operations: - OpenDAL can seek over content even on services like S3. -- OpenDAL can retry read from the failing porint without extra read cost. +- OpenDAL can retry read from the failing point without extra read cost. However, OpenDAL is not good at `write`: @@ -34,7 +34,7 @@ To exacerbate the situation, the multipart API is not standardized and only some ## Lack of retry support -OpenDAL can't retry `write` operations becuase we accept an `Box`. Once we pass this read into other functions, we consumed it. +OpenDAL can't retry `write` operations because we accept an `Box`. Once we pass this read into other functions, we consumed it. ```rust async fn write(&self, path: &str, args: OpWrite, r: input::Reader) -> Result { diff --git a/src/layers/retry.rs b/src/layers/retry.rs index 8008bd8357e..d0859794010 100644 --- a/src/layers/retry.rs +++ b/src/layers/retry.rs @@ -894,7 +894,7 @@ mod tests { match self.attempt { 1 => Err(Error::new( ErrorKind::RateLimited, - "retriable rate limited error from pager", + "retryable rate limited error from pager", ) .set_temporary()), 2 => { @@ -905,7 +905,7 @@ mod tests { Ok(Some(entries)) } 3 => Err( - Error::new(ErrorKind::Unexpected, "retriable internal server error") + Error::new(ErrorKind::Unexpected, "retryable internal server error") .set_temporary(), ), 4 => { diff --git a/src/raw/oio/entry.rs b/src/raw/oio/entry.rs index d741239450e..687f98e7494 100644 --- a/src/raw/oio/entry.rs +++ b/src/raw/oio/entry.rs @@ -74,7 +74,7 @@ impl Entry { /// Consume self to convert into an Entry. /// - /// NOTE: implement this by hand to avoid leadking raw entry to endusers. + /// NOTE: implement this by hand to avoid leaking raw entry to end-users. pub(crate) fn into_entry(self) -> crate::Entry { crate::Entry::new(self.path, self.meta) } diff --git a/src/services/s3/writer.rs b/src/services/s3/writer.rs index 5008b64e084..a1c79d07b4a 100644 --- a/src/services/s3/writer.rs +++ b/src/services/s3/writer.rs @@ -83,7 +83,7 @@ impl oio::Write for S3Writer { let upload_id = self.upload_id.as_ref().expect( "Writer doesn't have upload id, but users trying to call append, must be buggy", ); - // AWS S3 requires part numbder must between [1..=10000] + // AWS S3 requires part number must between [1..=10000] let part_number = self.parts.len() + 1; let mut req = self.backend.s3_upload_part_request( diff --git a/src/services/webhdfs/error.rs b/src/services/webhdfs/error.rs index f2f9d1398e7..373d6a88c6f 100644 --- a/src/services/webhdfs/error.rs +++ b/src/services/webhdfs/error.rs @@ -48,7 +48,7 @@ fn parse_error_msg(parts: Parts, body: &str) -> Result { StatusCode::NOT_FOUND => (ErrorKind::NotFound, false), StatusCode::UNAUTHORIZED | StatusCode::FORBIDDEN => (ErrorKind::PermissionDenied, false), // passing invalid arguments will return BAD_REQUEST - // should be unretriable + // should be unretryable StatusCode::BAD_REQUEST => (ErrorKind::Unexpected, false), StatusCode::INTERNAL_SERVER_ERROR | StatusCode::BAD_GATEWAY diff --git a/src/types/entry.rs b/src/types/entry.rs index 13e52861c2e..a851da8fe5d 100644 --- a/src/types/entry.rs +++ b/src/types/entry.rs @@ -52,7 +52,7 @@ impl Entry { /// /// # Notes /// - /// This function is crate internal only. Becuase the returning + /// This function is crate internal only. Because the returning /// metadata could be incomplete. Users must use `Operator::metadata` /// to query the cached metadata instead. pub(crate) fn metadata(&self) -> &Metadata { diff --git a/src/types/operator/builder.rs b/src/types/operator/builder.rs index 3d6060c65ca..2d95122275e 100644 --- a/src/types/operator/builder.rs +++ b/src/types/operator/builder.rs @@ -164,7 +164,7 @@ impl Operator { #[must_use] pub fn layer>(self, layer: L) -> Self { Self::from_inner(Arc::new( - TypeEraseLayer.layer(layer.layer(self.into_innter())), + TypeEraseLayer.layer(layer.layer(self.into_inner())), )) } } diff --git a/src/types/operator/operator.rs b/src/types/operator/operator.rs index e85fbd19fc9..56b3ea9701d 100644 --- a/src/types/operator/operator.rs +++ b/src/types/operator/operator.rs @@ -76,7 +76,7 @@ impl Operator { } } - pub(super) fn into_innter(self) -> FusedAccessor { + pub(super) fn into_inner(self) -> FusedAccessor { self.accessor } @@ -121,7 +121,7 @@ impl Operator { } } -/// Operato async API. +/// Operator async API. impl Operator { /// Check if this operator can work correctly. /// @@ -875,7 +875,7 @@ impl Operator { } } -/// Operato presign API. +/// Operator presign API. impl Operator { /// Presign an operation for stat(head). ///