Skip to content

Simplifications & general improvements #28

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

Merged
merged 3 commits into from
Jan 9, 2021
Merged

Simplifications & general improvements #28

merged 3 commits into from
Jan 9, 2021

Conversation

ihrwein
Copy link
Owner

@ihrwein ihrwein commented Jan 7, 2021

Changes

  • Operation and FutureOperation has been removed
  • Considerable parts of the README was moved to the crate's doc
  • source code was reformatted with cargo fmt
  • breaking changes documented

@ihrwein
Copy link
Owner Author

ihrwein commented Jan 7, 2021

@coolreader18 may I ask you to review the PR?

where
B: Backoff,
Fn: FutureOperation<I, E>,
Fn: Future<Output = Result<I, Error<E>>>,
Copy link
Contributor

@coolreader18 coolreader18 Jan 7, 2021

Choose a reason for hiding this comment

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

I think you have to have another generic Fut here, which is the Future<Output = ...>, and then Fn: FnMut() -> Fut

Copy link
Contributor

@coolreader18 coolreader18 left a comment

Choose a reason for hiding this comment

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

Looks good overall, just the thing about Future vs FnMut() -> Future. I'm pretty sure with how it is currently, retry would panic once it attempts the second try, since the Future from the async {} block would be exhausted.

@ihrwein
Copy link
Owner Author

ihrwein commented Jan 8, 2021

Thank you for the review!

@ihrwein ihrwein merged commit d2c2702 into master Jan 9, 2021
@ihrwein ihrwein deleted the simplification branch January 9, 2021 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants