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

Drop load() functions from empty Fn structs #752

Merged
merged 1 commit into from
May 6, 2023
Merged

Conversation

MarijnS95
Copy link
Collaborator

Fixes #442, cc @Rua

These functions don't contribute anything and should be removed to clean up the features and extensions files, while now also not showing in the documentation anymore. The structs remain in place for associated constants but are replaced with true unit-like structs (no curly brackets anymore), and unneeded unsafe impl Send/Sync are removed as well.

As these load() functions have been removed from the empty feature-levels on Entry and Device as well, rather than instantiating the unit structs and returning those the fields and fp_vX_X() getters have been removed entirely.

These functions don't contribute anything and should be removed to clean
up the `features` and `extensions` files, while now also not showing in
the documentation anymore.  The structs remain in place for associated
constants but are replaced with true unit-like structs (no curly
brackets anymore), and unneeded `unsafe impl Send/Sync` are removed as
well.

As these `load()` functions have been removed from the empty
feature-levels on `Entry` and `Device` as well, rather than
instantiating the unit structs and returning those the fields and
`fp_vX_X()` getters have been removed entirely.
@MarijnS95
Copy link
Collaborator Author

As these load() functions have been removed from the empty feature-levels on Entry and Device as well, rather than instantiating the unit structs and returning those the fields and fp_vX_X() getters have been removed entirely.

We could also leave the empty/unit types in place for consistency, but I don't think it adds any value to keep them around.

@MarijnS95 MarijnS95 merged commit cf1c92e into master May 6, 2023
@MarijnS95 MarijnS95 deleted the drop-empty-load branch May 6, 2023 18:22
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.

Don't generate function structs for extensions that have no functions
2 participants