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

Use C string literal #1638

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Use C string literal #1638

merged 1 commit into from
Sep 18, 2024

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Sep 15, 2024

This switches to use C string literal that stabilized in Rust 1.77. It is safer and simpler than the current "...\0".as_ptr() as *const c_char because the safety requirements for C strings are guaranteed at compile time and no as *const c_char casts are needed.

@rustbot
Copy link
Collaborator

rustbot commented Sep 15, 2024

r? @Amanieu

rustbot has assigned @Amanieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Amanieu Amanieu enabled auto-merge (rebase) September 18, 2024 09:36
@Amanieu Amanieu merged commit f827440 into rust-lang:master Sep 18, 2024
33 checks passed
@taiki-e taiki-e deleted the c-string-literal branch September 18, 2024 14:37
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.

3 participants