Skip to content

Commit c5a3cbb

Browse files
committed
Fix typos in CStr docs
1 parent dcc6ce2 commit c5a3cbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/ffi/c_str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl CString {
224224
/// Returns the contents of this `CString` as a slice of bytes.
225225
///
226226
/// The returned slice does **not** contain the trailing nul separator and
227-
/// it is guaranteet to not have any interior nul bytes.
227+
/// it is guaranteed to not have any interior nul bytes.
228228
pub fn as_bytes(&self) -> &[u8] {
229229
&self.inner[..self.inner.len() - 1]
230230
}
@@ -333,7 +333,7 @@ impl CStr {
333333
/// Return the inner pointer to this C string.
334334
///
335335
/// The returned pointer will be valid for as long as `self` is and points
336-
/// to a continguous region of memory terminated with a 0 byte to represent
336+
/// to a contiguous region of memory terminated with a 0 byte to represent
337337
/// the end of the string.
338338
pub fn as_ptr(&self) -> *const libc::c_char {
339339
self.inner.as_ptr()

0 commit comments

Comments
 (0)