-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add doc examples & description in std::os::unix::ffi
.
#39065
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
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few little things missing.
@@ -43,9 +66,32 @@ impl OsStringExt for OsString { | |||
#[stable(feature = "rust1", since = "1.0.0")] | |||
pub trait OsStrExt { | |||
#[stable(feature = "rust1", since = "1.0.0")] | |||
/// Creates an `OsStr` from a byte slice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing url.
/// let bytes = b"foo"; | ||
/// let os_str = OsStr::from_bytes(bytes); | ||
/// assert_eq!(os_str.to_str(), Some("foo")); | ||
/// ``` | ||
fn from_bytes(slice: &[u8]) -> &Self; | ||
|
||
/// Gets the underlying byte view of the `OsStr` slice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add the missing url here as well please?
/// let bytes = b"foo".to_vec(); | ||
/// let os_string = OsString::from_vec(bytes); | ||
/// assert_eq!(os_string.to_str(), Some("foo")); | ||
/// ``` | ||
#[stable(feature = "rust1", since = "1.0.0")] | ||
fn from_vec(vec: Vec<u8>) -> Self; | ||
|
||
/// Yields the underlying byte vector of this `OsString`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add the missing url here as well please?
@@ -21,10 +21,33 @@ use sys_common::{FromInner, IntoInner, AsInner}; | |||
#[stable(feature = "rust1", since = "1.0.0")] | |||
pub trait OsStringExt { | |||
/// Creates an `OsString` from a byte vector. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add the missing url here as well please?
35b5026
to
617e97c
Compare
617e97c
to
de73e52
Compare
Comments have been addressed. Tests pass on Travis. |
Thanks! @bors: r+ rollup |
📌 Commit de73e52 has been approved by |
⌛ Testing commit de73e52 with merge 1a5c87f... |
💔 Test failed - status-travis |
… On Mon, Jan 16, 2017 at 8:06 AM, bors ***@***.***> wrote:
💔 Test failed - status-travis
<https://travis-ci.org/rust-lang/rust/builds/192401713>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#39065 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD95OOMjL6JZyBB9dtMZyNp99KVkU2Uks5rS5WegaJpZM4LjsKP>
.
|
…=GuillaumeGomez Add doc examples & description in `std::os::unix::ffi`. None
No description provided.