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

feat(router): Add RoutesBuilder constructor #1855

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

tottoto
Copy link
Collaborator

@tottoto tottoto commented Aug 6, 2024

Adds RoutesBuilder constructor.

@@ -27,6 +27,11 @@ pub struct RoutesBuilder {
}

impl RoutesBuilder {
/// Create a new empty builder.
pub fn empty() -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see much value in this, and it's definitely not necessary for the builder() method.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In terms of whether this is necessary for a Routes::builder method, it is not, but it is there to provide a constructor that indicates that intention, and is not provided for implementing a Routes::builder method.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed it as the preferred style for creating builder is Routes::builder.

@tottoto tottoto force-pushed the add-routesbuilder-constructor branch from 0939a2a to acc711b Compare August 6, 2024 11:20
@djc djc added this pull request to the merge queue Aug 6, 2024
Merged via the queue into hyperium:master with commit b1b5e89 Aug 6, 2024
16 checks passed
@tottoto tottoto deleted the add-routesbuilder-constructor branch August 6, 2024 13:30
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