Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonqn committed Sep 26, 2021
1 parent 81d8eb6 commit 7473422
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fure"
version = "0.3.0"
version = "0.3.1"
edition = "2018"
authors = ["Ilya Titkov <[email protected]>"]
keywords = ["futures-retry", "retry", "futures"]
Expand Down
2 changes: 1 addition & 1 deletion src/policies/concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mod delayed {
use super::*;
use std::time::Duration;

/// Creates a policy to run additional future after `force_retry_after` without getting a result.
/// Creates a policy to run additional future after `force_retry_after` has passed without a result.
///
/// After each completed future the previous delay is dropped and a new one is started.
/// ## Example
Expand Down
5 changes: 3 additions & 2 deletions src/policies/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub fn failed<P>(policy: P, max_retries: usize) -> RetryAttempts<P, usize> {
}
}

/// Returns a policy to retry futures while `cond` returns `true`
/// Creates a policy to retry futures while `cond` returns `true`
pub fn cond<P, T, E, FN>(policy: P, cond: FN) -> RetryAttempts<P, FN>
where
FN: FnMut(Option<Result<&T, &E>>) -> bool,
Expand All @@ -31,7 +31,7 @@ where
}
}

/// An policy created by [`failed`] and [`cond`].
/// A policy is created by [`failed`] and [`cond`].
pub struct RetryAttempts<P, C> {
policy: P,
condition: C,
Expand Down Expand Up @@ -88,6 +88,7 @@ where
}

pin_project! {
/// A future for [`RetryAttempts`]
pub struct RetryMap<F, C>
{
#[pin]
Expand Down

0 comments on commit 7473422

Please sign in to comment.