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

Implement Default for MakeRequestUuid #335

Merged
merged 2 commits into from
Mar 11, 2023

Conversation

tottoto
Copy link
Contributor

@tottoto tottoto commented Mar 11, 2023

Motivation

Hides the details of MakeRequestUuid in instantiating it.

Solution

Implements Default for MakeRequestUuid.

@@ -591,7 +591,7 @@ mod tests {
#[tokio::test]
async fn uuid() {
let svc = ServiceBuilder::new()
.set_x_request_id(MakeRequestUuid)
.set_x_request_id(MakeRequestUuid::default())
Copy link
Member

Choose a reason for hiding this comment

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

I'm okay with deriving default but don't think we need to use it here. It's just more typing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@davidpdrsn davidpdrsn merged commit 0d70221 into tower-rs:master Mar 11, 2023
@tottoto tottoto deleted the makerequestuuid-default branch March 11, 2023 16:08
gezihuzi pushed a commit to gezihuzi/tower-http that referenced this pull request Jul 19, 2023
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.

None yet

2 participants