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

Add example of middleware with async usage #577

Merged
merged 1 commit into from
Nov 10, 2021
Merged

Add example of middleware with async usage #577

merged 1 commit into from
Nov 10, 2021

Conversation

AngelicosPhosphoros
Copy link
Contributor

I think, this is useful because allows user to avoid usage of futures_util.

I don't know if I must adjust existing introduction or add new example project to the middleware folder so I added it to existing example for now.

I can change it if needed.

@codecov
Copy link

codecov bot commented Nov 10, 2021

Codecov Report

Merging #577 (3fecef2) into master (7efda5e) will increase coverage by 0.01%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #577      +/-   ##
==========================================
+ Coverage   85.82%   85.84%   +0.01%     
==========================================
  Files         111      112       +1     
  Lines        5722     5770      +48     
==========================================
+ Hits         4911     4953      +42     
- Misses        811      817       +6     
Impacted Files Coverage Δ
examples/middleware/introduction_await/src/main.rs 87.50% <87.50%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7efda5e...3fecef2. Read the comment docs.

@msrd0
Copy link
Member

msrd0 commented Nov 10, 2021

Hi, thanks for the PR!

I think it makes more sense to add a second example (say introduction_await) that does the same as the current example, just with using await instead of futures-util's function calls.

@AngelicosPhosphoros
Copy link
Contributor Author

I added new example project and removed changes from old example.

I think, this is useful because allows user to avoid usage of futures_util.
Copy link
Member

@msrd0 msrd0 left a comment

Choose a reason for hiding this comment

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

Thanks

@msrd0 msrd0 merged commit 097822e into gotham-rs:master Nov 10, 2021
@AngelicosPhosphoros AngelicosPhosphoros deleted the add_async_middleware_example branch November 10, 2021 13:51
@msrd0 msrd0 added this to the 0.7 milestone Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants