Skip to content

Commit

Permalink
chore: typo (#1501)
Browse files Browse the repository at this point in the history
Signed-off-by: suyanhanx <[email protected]>
  • Loading branch information
suyanhanx authored Mar 8, 2023
1 parent 32df27c commit 3e70d58
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/docs/rfcs/0429_init_from_iter.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Summary

Allow initing opendal operators from an iterator.
Allow initializing opendal operators from an iterator.

# Motivation

Expand Down
2 changes: 1 addition & 1 deletion src/docs/rfcs/0977_refactor_error.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion src/docs/rfcs/1391_object_metadataer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Summary

Add object metadataer to avoid unneed extra metadata call.
Add object metadataer to avoid unneeded extra metadata call.

# Motivation

Expand Down
2 changes: 1 addition & 1 deletion src/docs/rfcs/1398_query_based_metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/docs/rfcs/1420_object_writer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

Expand All @@ -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<dyn AsyncRead>`. Once we pass this read into other functions, we consumed it.
OpenDAL can't retry `write` operations because we accept an `Box<dyn AsyncRead>`. Once we pass this read into other functions, we consumed it.

```rust
async fn write(&self, path: &str, args: OpWrite, r: input::Reader) -> Result<RpWrite> {
Expand Down
4 changes: 2 additions & 2 deletions src/layers/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand All @@ -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 => {
Expand Down
2 changes: 1 addition & 1 deletion src/raw/oio/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/s3/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/services/webhdfs/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn parse_error_msg(parts: Parts, body: &str) -> Result<Error> {
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
Expand Down
2 changes: 1 addition & 1 deletion src/types/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/types/operator/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl Operator {
#[must_use]
pub fn layer<L: Layer<FusedAccessor>>(self, layer: L) -> Self {
Self::from_inner(Arc::new(
TypeEraseLayer.layer(layer.layer(self.into_innter())),
TypeEraseLayer.layer(layer.layer(self.into_inner())),
))
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/types/operator/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl Operator {
}
}

pub(super) fn into_innter(self) -> FusedAccessor {
pub(super) fn into_inner(self) -> FusedAccessor {
self.accessor
}

Expand Down Expand Up @@ -121,7 +121,7 @@ impl Operator {
}
}

/// Operato async API.
/// Operator async API.
impl Operator {
/// Check if this operator can work correctly.
///
Expand Down Expand Up @@ -875,7 +875,7 @@ impl Operator {
}
}

/// Operato presign API.
/// Operator presign API.
impl Operator {
/// Presign an operation for stat(head).
///
Expand Down

1 comment on commit 3e70d58

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for opendal ready!

✅ Preview
https://opendal-6mp9r9knc-databend.vercel.app

Built with commit 3e70d58.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.