diff options
| author | Federico Mena Quintero <federico@gnome.org> | 2017-10-11 17:53:13 -0500 |
|---|---|---|
| committer | Federico Mena Quintero <federico@gnome.org> | 2017-10-11 17:53:13 -0500 |
| commit | 026451093dbce9d1d2077d4c2bae3a92d413c203 (patch) | |
| tree | db0e6d7aac9cc2673fb1aee41a595c54354ef8e7 /src/libstd | |
| parent | a9a4ce6dcc694e2ea35344aa790a73a5dea573f0 (diff) | |
| download | rust-026451093dbce9d1d2077d4c2bae3a92d413c203.tar.gz rust-026451093dbce9d1d2077d4c2bae3a92d413c203.zip | |
ffi/c_str.rs: Use only one space after a period ending a sentence
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/ffi/c_str.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 51a5865d29c..7d3313fb9d5 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -49,7 +49,7 @@ use str::{self, Utf8Error}; /// # Extracting a raw pointer to the whole C string /// /// `CString` implements a [`as_ptr`] method through the [`Deref`] -/// trait. This method will give you a `*const c_char` which you can +/// trait. This method will give you a `*const c_char` which you can /// feed directly to extern functions that expect a nul-terminated /// string, like C's `strdup()`. /// @@ -70,7 +70,7 @@ use str::{self, Utf8Error}; /// Once you have the kind of slice you need (with or without a nul /// terminator), you can call the slice's own /// [`as_ptr`][slice.as_ptr] method to get a raw pointer to pass to -/// extern functions. See the documentation for that function for a +/// extern functions. See the documentation for that function for a /// discussion on ensuring the lifetime of the raw pointer. /// /// [`Into`]: ../convert/trait.Into.html @@ -130,8 +130,8 @@ pub struct CString { /// Representation of a borrowed C string. /// /// This type represents a borrowed reference to a nul-terminated -/// array of bytes. It can be constructed safely from a `&[`[`u8`]`]` -/// slice, or unsafely from a raw `*const c_char`. It can then be +/// array of bytes. It can be constructed safely from a `&[`[`u8`]`]` +/// slice, or unsafely from a raw `*const c_char`. It can then be /// converted to a Rust [`&str`] by performing UTF-8 validation, or /// into an owned [`CString`]. /// @@ -374,7 +374,7 @@ impl CString { /// to undefined behavior or allocator corruption. /// /// > **Note:** If you need to borrow a string that was allocated by - /// > foreign code, use [`CStr`]. If you need to take ownership of + /// > foreign code, use [`CStr`]. If you need to take ownership of /// > a string that was allocated by foreign code, you will need to /// > make your own provisions for freeing it appropriately, likely /// > with the foreign code's API to do that. @@ -521,7 +521,7 @@ impl CString { /// /// The returned slice does **not** contain the trailing nul /// terminator, and it is guaranteed to not have any interior nul - /// bytes. If you need the nul terminator, use + /// bytes. If you need the nul terminator, use /// [`as_bytes_with_nul`] instead. /// /// [`as_bytes_with_nul`]: #method.as_bytes_with_nul @@ -1035,7 +1035,7 @@ impl CStr { /// Yields a [`&str`] slice if the `CStr` contains valid UTF-8. /// /// If the contents of the `CStr` are valid UTF-8 data, this - /// function will return the corresponding [`&str`] slice. Otherwise, + /// function will return the corresponding [`&str`] slice. Otherwise, /// it will return an error with details of where UTF-8 validation failed. /// /// > **Note**: This method is currently implemented to check for validity @@ -1066,7 +1066,7 @@ impl CStr { /// /// If the contents of the `CStr` are valid UTF-8 data, this /// function will return a [`Cow`]`::`[`Borrowed`]`(`[`&str`]`)` - /// with the the corresponding [`&str`] slice. Otherwise, it will + /// with the the corresponding [`&str`] slice. Otherwise, it will /// replace any invalid UTF-8 sequences with `U+FFFD REPLACEMENT /// CHARACTER` and return a [`Cow`]`::`[`Owned`]`(`[`String`]`)` /// with the result. |
