From 7473422d212f1a5ea95989d270b5157f90a879f3 Mon Sep 17 00:00:00 2001 From: Ilya Titkov Date: Sun, 26 Sep 2021 19:27:54 +0300 Subject: [PATCH] Update docs --- Cargo.toml | 2 +- src/policies/concurrent.rs | 2 +- src/policies/mod.rs | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4456338..34784cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fure" -version = "0.3.0" +version = "0.3.1" edition = "2018" authors = ["Ilya Titkov "] keywords = ["futures-retry", "retry", "futures"] diff --git a/src/policies/concurrent.rs b/src/policies/concurrent.rs index 0e9f4b5..50486a5 100644 --- a/src/policies/concurrent.rs +++ b/src/policies/concurrent.rs @@ -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 diff --git a/src/policies/mod.rs b/src/policies/mod.rs index 9bbda00..4fa69be 100644 --- a/src/policies/mod.rs +++ b/src/policies/mod.rs @@ -20,7 +20,7 @@ pub fn failed

(policy: P, max_retries: usize) -> RetryAttempts { } } -/// Returns a policy to retry futures while `cond` returns `true` +/// Creates a policy to retry futures while `cond` returns `true` pub fn cond(policy: P, cond: FN) -> RetryAttempts where FN: FnMut(Option>) -> bool, @@ -31,7 +31,7 @@ where } } -/// An policy created by [`failed`] and [`cond`]. +/// A policy is created by [`failed`] and [`cond`]. pub struct RetryAttempts { policy: P, condition: C, @@ -88,6 +88,7 @@ where } pin_project! { + /// A future for [`RetryAttempts`] pub struct RetryMap { #[pin]