Skip to content

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