Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix typo #1285

Merged
merged 1 commit into from
Feb 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ pub trait Builder: Default {
Self::from_map(envs)
}

/// Consume the accessoer builder to build a service.
/// Consume the accessor builder to build a service.
fn build(&mut self) -> Result<Self::Accessor>;
}
10 changes: 5 additions & 5 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,23 @@ impl From<ErrorKind> for &'static str {

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
enum ErrorStatus {
/// Permenent means without external changes, the error never changes.
/// Permanent means without external changes, the error never changes.
///
/// For example, underlying services returns a not found error.
///
/// Users SHOULD never retry this operation.
Permanent,
/// Temporary means this error is returned for temporary.
///
/// For example, underlying services is rate limited or unailable for temporary.
/// For example, underlying services is rate limited or unavailable for temporary.
///
/// Users CAN retry the operation to resolve it.
Temporary,
/// Persistent means this error used to be temporary but still failed after retry.
///
/// For example, underlying services kept returning network errors.
///
/// Users MAY retry this opration but it's highly possible to error again.
/// Users MAY retry this operation but it's highly possible to error again.
Persistent,
}

Expand Down Expand Up @@ -267,7 +267,7 @@ impl Error {
f(self)
}

/// Set permenent status for error.
/// Set permanent status for error.
pub fn set_permanent(mut self) -> Self {
self.status = ErrorStatus::Permanent;
self
Expand All @@ -281,7 +281,7 @@ impl Error {
self
}

/// Set perisistent status for error.
/// Set persistent status for error.
///
/// By setting persistent, we indicate the retry should be stopped.
pub fn set_persistent(mut self) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
//! | [http][services::Http] | HTTP read-only backend. |
//! | [ipfs][services::Ipfs] | IPFS HTTP Gateway support. |
//! | [ipmfs][services::Ipmfs] | IPFS Mutable File System support. |
//! | [memcached][services::Memcached] | Memcached serivce. |
//! | [memcached][services::Memcached] | Memcached service. |
//! | [memory][services::Memory] | In memory backend support. |
//! | [moka][services::Moka] | [moka](https://github.com/moka-rs/moka) backend support. |
//! | [obs][services::Obs] | Huawei Cloud OBS service. |
Expand Down
8 changes: 4 additions & 4 deletions src/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl Operator {
/// bit runtime overhead with an extra vtable lookup and unable to
/// inline.
///
/// It's always recommanded to use `OperatorBuilder::layer()` instead.
/// It's always recommended to use `OperatorBuilder::layer()` instead.
///
/// # Examples
///
Expand Down Expand Up @@ -279,7 +279,7 @@ impl Operator {
///
/// # Examples
///
/// For users who want to support many services, we can build a helper fucntion like the following:
/// For users who want to support many services, we can build a helper function like the following:
///
/// ```
/// use std::collections::HashMap;
Expand Down Expand Up @@ -320,7 +320,7 @@ impl<A: Accessor> OperatorBuilder<A> {
/// Create a new operator builder.
#[allow(clippy::new_ret_no_self)]
pub fn new(accessor: A) -> OperatorBuilder<impl Accessor> {
// Make sure error context layer hass been attached.
// Make sure error context layer has been attached.
OperatorBuilder { accessor }.layer(ErrorContextLayer)
}

Expand All @@ -333,7 +333,7 @@ impl<A: Accessor> OperatorBuilder<A> {
/// bit runtime overhead with an extra vtable lookup and unable to
/// inline.
///
/// It's always recommanded to use `OperatorBuilder::layer()` instead.
/// It's always recommended to use `OperatorBuilder::layer()` instead.
///
/// # Examples
///
Expand Down