added Error and Display impl for std::ffi::FromBytesWithNulError#39960
added Error and Display impl for std::ffi::FromBytesWithNulError#39960bors merged 2 commits intorust-lang:masterfrom chordowl:issue-39925
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @BurntSushi (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
src/libstd/ffi/c_str.rs
Outdated
| } | ||
| } | ||
|
|
||
| #[unstable(feature = "frombyteswithnulerror_impls", reason = "recently added", issue = "39925")] |
There was a problem hiding this comment.
Oh unfortunately impls aren't subject to stability the same way as other parts of the standard library, so these'll be "insta-stable" so it's ok to just go ahead and tag this with #[stable]
|
Looks good to me, thanks @lukaramu! @rfcbot fcp merge |
|
Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Changed stability annotations for the new Error and Display impls for std::ffi::FromBytesWithNulError as they aren't subject to stability the same way.
| #[unstable(feature = "frombyteswithnulerror_impls", reason = "recently added", issue = "39925")] | ||
| impl Error for FromBytesWithNulError { | ||
| fn description(&self) -> &str { | ||
| "data provided is not null terminated or contains an interior nul byte" |
There was a problem hiding this comment.
Shouldn't it be interior null byte?
There was a problem hiding this comment.
Not necessarily. https://en.wikipedia.org/wiki/Null_character
Also note the name of the error type.
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
@bors: r+ |
|
📌 Commit 48331ef has been approved by |
added Error and Display impl for std::ffi::FromBytesWithNulError Fixes rust-lang#39925. This is my first PR, so I wasn't quite sure about the stability annotation.
Fixes #39925.
This is my first PR, so I wasn't quite sure about the stability annotation.