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 test for box_pool with CamelCase types #417

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

newAM
Copy link
Member

@newAM newAM commented Nov 17, 2023

Part of #411

@reitermarkus
Copy link
Member

What if I want to do

box_pool! {
  MY_POOL: MyPoolData
}

instead? Then I need #[allow(non_camel_case_types)] on the type.

Can we add a second macro case which allows specifying separate idents for type and constant name, something like the following?

box_pool! {
  MY_POOL: MyPool<MyPoolData>
}

@reitermarkus
Copy link
Member

Nevermind, I just realized only the type is exposed. I thought the macro generates both a type and constant with the same name.

So this looks like fine as is.

@newAM newAM marked this pull request as ready for review November 22, 2023 17:03
@newAM
Copy link
Member Author

newAM commented Nov 22, 2023

That is a good point though, we should also suppress the clippy lint for SNAKE_CASE and let the user do what they want.

@newAM newAM requested a review from Dirbaio November 22, 2023 17:04
@newAM newAM linked an issue Nov 22, 2023 that may be closed by this pull request
2 tasks
@Dirbaio Dirbaio added this pull request to the merge queue Nov 22, 2023
Merged via the queue into rust-embedded:main with commit a09fe68 Nov 22, 2023
@newAM newAM deleted the box-case branch November 22, 2023 17:31
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.

style and clippy
3 participants