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

Make names const #594

Closed
wants to merge 1 commit into from
Closed

Conversation

Neo-Zhixing
Copy link
Contributor

@Neo-Zhixing Neo-Zhixing commented Mar 13, 2022

std::ffi::CStr::from_bytes_with_nul_unchecked was const stabilized in Rust 1.59, meaning that the name() functions in extensions can now be const as well.

Alternatively we can do away with name() functions and use associated consts instead. However this would be a breaking change.

const NAME: &'static CStr = xxxxxx;

@Ralith
Copy link
Collaborator

Ralith commented Mar 14, 2022

Is this redundant to #590?

@Neo-Zhixing
Copy link
Contributor Author

Oops, didn't see that #590 also did this. Closing now.

@MarijnS95
Copy link
Collaborator

I'd be happy to land both changes as separate PRs, tbh.

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.

None yet

3 participants