Skip to content

Fix typos in CStr docs #22670

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

Merged
merged 1 commit into from
Feb 23, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libstd/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ impl CString {
/// Returns the contents of this `CString` as a slice of bytes.
///
/// The returned slice does **not** contain the trailing nul separator and
/// it is guaranteet to not have any interior nul bytes.
/// it is guaranteed to not have any interior nul bytes.
pub fn as_bytes(&self) -> &[u8] {
&self.inner[..self.inner.len() - 1]
}
Expand Down Expand Up @@ -333,7 +333,7 @@ impl CStr {
/// Return the inner pointer to this C string.
///
/// The returned pointer will be valid for as long as `self` is and points
/// to a continguous region of memory terminated with a 0 byte to represent
/// to a contiguous region of memory terminated with a 0 byte to represent
/// the end of the string.
pub fn as_ptr(&self) -> *const libc::c_char {
self.inner.as_ptr()
Expand Down