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

Rename type macros in UpperCamelCase. #147

Merged
merged 8 commits into from
Nov 25, 2022
Merged

Rename type macros in UpperCamelCase. #147

merged 8 commits into from
Nov 25, 2022

Conversation

Anders429
Copy link
Owner

Fixes #141.

This renames the registry! and views! macros to Registry! and Views!, respectively. It also ensures that only the macros are reexported, while the traits are kept private.

This ultimately helps with clarity over which macros are for types and which macros are not. While this isn't officially part of the Rust API guidelines, since it has passed a final comment period and is currently in use in big crates like syn (see syn::Token!, I think it's the right direction to go.

@Anders429 Anders429 added C - Code Quality Category: Addressing quality and cleanup of existing code. P - Low Priority: Not particularly urgent. V - Major Breaking Change Versioning: Requires a major bump according to semver. labels Nov 25, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2022

Codecov Report

Merging #147 (aa1161e) into dev (9d2168d) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev     #147   +/-   ##
=======================================
  Coverage   94.81%   94.81%           
=======================================
  Files          73       73           
  Lines       10222    10222           
=======================================
  Hits         9692     9692           
  Misses        530      530           
Impacted Files Coverage Δ
src/archetype/impl_serde.rs 99.82% <ø> (ø)
src/archetypes/impl_serde.rs 98.14% <ø> (ø)
src/archetypes/mod.rs 99.04% <ø> (ø)
src/entities/mod.rs 100.00% <ø> (ø)
src/entity/allocator/impl_serde.rs 98.76% <ø> (ø)
src/entity/allocator/location.rs 53.84% <ø> (ø)
src/entity/allocator/slot.rs 82.85% <ø> (ø)
src/entity/identifier/mod.rs 100.00% <ø> (ø)
src/entity/mod.rs 100.00% <ø> (ø)
src/lib.rs 100.00% <ø> (ø)
... and 24 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Anders429 Anders429 changed the base branch from master to dev November 25, 2022 23:00
@Anders429 Anders429 merged commit c5291f3 into dev Nov 25, 2022
@Anders429 Anders429 deleted the cap branch November 25, 2022 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - Code Quality Category: Addressing quality and cleanup of existing code. P - Low Priority: Not particularly urgent. V - Major Breaking Change Versioning: Requires a major bump according to semver.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use UpperCamelCase for type macros.
2 participants