Uh oh!
There was an error while loading. Please reload this page.
Documentation for CStr is not that of CString - #84000
Conversation
rust-highfive
commented
Apr 8, 2021
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
61aa43d to
72cac1cCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bstrie
commented
May 12, 2021
@eggyal , have you had time to address the most recent comments? |
eggyal
commented
May 13, 2021
Erroneous push closed PR accidentally. @rustbot label -S-waiting-on-author +S-waiting-on-review |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d16d8ca to
053e0c7Compare
This comment has been minimized.
This comment has been minimized.
eggyal
commented
May 14, 2021
Aaagh, sorry, I'm making a right hash of git today. |
m-ou-se
left a comment
There was a problem hiding this comment.
I don't think this change in its current form is an improvement. The original example shows the subtle mistake of using CString::new and .as_ptr() in the same expression, which is an easy mistake to make. The new example shows a more contrived snippet, which doesn't show as clearly how easy it is to make this mistake.
In addition, the changed documentation continues to explain a fix that doesn't just keep the right variable alive longer, but uses a completely different method of using a [u8; _] called bytes which the first example doesn't have, making it harder to focus on the lifetime problem itself.
crlf0710
commented
Jun 5, 2021
@eggyal Ping from triage, any updates on this? |
JohnCSimon
commented
Jun 22, 2021
@eggyal Ping from triage: I'm closing this as inactive because it hasn't moved for a month. Please feel free to reopen when you're ready to continue. |
Fixes#83999