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 TypedPath for WithRejection<TypedPath, _> #2491

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

davidpdrsn
Copy link
Member

Fixes #2489

Comment on lines 140 to 141
#[cfg(feature = "typed-routing")]
const _: () = {
Copy link
Member

Choose a reason for hiding this comment

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

Why do it this way? I find the const _ trick a bit weird.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just so you don't need to put #[cfg(feature = "typed-routing")] on the imports as well (unless you want warnings) or use fully qualified paths.

Copy link
Member

Choose a reason for hiding this comment

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

I think I'd prefer either of those solutions 😅

cc rust-lang/rust#65516 ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

I hope that doesn't land 😅 I think its pretty useful to be able to define stuff everywhere though I do see its a nightmare from and IDE point of view.

But I've fixed it in c1b2756

@davidpdrsn davidpdrsn requested a review from jplatte January 4, 2024 20:04
@davidpdrsn davidpdrsn enabled auto-merge (squash) January 4, 2024 20:04
@davidpdrsn davidpdrsn merged commit c486cc8 into main Jan 4, 2024
18 checks passed
@davidpdrsn davidpdrsn deleted the david/with-rejection-typed-path branch January 4, 2024 20:08
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.

Implement TypedPath for WithRejection<TypedPath, _>
2 participants