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

Use tuples instead of ServiceBuilder internally #2229

Merged
merged 1 commit into from
Sep 17, 2023

Conversation

davidpdrsn
Copy link
Member

Replace most uses of ServiceBuilder internally with tuples. A bit cleaner I think.

I still kept uses of ServiceBuilder in the docs because its more discoverable.

@davidpdrsn davidpdrsn added C-cleanup Category: PRs that clean code up or issues documenting cleanup. A-axum labels Sep 17, 2023
@davidpdrsn davidpdrsn force-pushed the david/replace-servicebuilder-with-tuples branch from 25668ef to 4fbdd54 Compare September 17, 2023 08:33
@davidpdrsn davidpdrsn merged commit 9eb502c into main Sep 17, 2023
18 checks passed
@davidpdrsn davidpdrsn deleted the david/replace-servicebuilder-with-tuples branch September 17, 2023 08:56
axum/src/routing/method_routing.rs Show resolved Hide resolved
Comment on lines +130 to +133
.layer((
HandleErrorLayer::new(|_| async { StatusCode::REQUEST_TIMEOUT }),
TimeoutLayer::new(Duration::from_millis(10)),
));
Copy link
Member

Choose a reason for hiding this comment

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

also here

Comment on lines +304 to +307
.layer((
HandleErrorLayer::new(|_: BoxError| async move { StatusCode::REQUEST_TIMEOUT }),
TimeoutLayer::new(Duration::new(0, 0)),
))
Copy link
Member

Choose a reason for hiding this comment

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

and here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-axum C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants