Fix typos.

This commit is contained in:
Bruce Mitchener
2019-07-16 11:18:49 -07:00
committed by Sean McArthur
parent 9b5e33d6f0
commit e25b75a28e
6 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -16,7 +16,7 @@ macro_rules! buf_get_impl {
}
};
if let Some(ret) = ret {
// if the direct convertion was possible, advance and return
// if the direct conversion was possible, advance and return
$this.advance($size);
return ret;
} else {
@@ -792,7 +792,7 @@ pub trait Buf {
/// Transforms a `Buf` into a concrete buffer.
///
/// `collect()` can operate on any value that implements `Buf`, and turn it
/// into the relevent concrete buffer type.
/// into the relevant concrete buffer type.
///
/// # Examples
///
@@ -997,6 +997,6 @@ impl Buf for Option<[u8; 1]> {
}
}
// The existance of this function makes the compiler catch if the Buf
// The existence of this function makes the compiler catch if the Buf
// trait is "object-safe" or not.
fn _assert_trait_object(_b: &dyn Buf) {}
+2 -2
View File
@@ -942,7 +942,7 @@ pub trait BufMut {
/// // Adapt reference to `std::io::Write`.
/// let mut writer = reference.writer();
///
/// // Use the buffer as a writter
/// // Use the buffer as a writer
/// io::Write::write(&mut writer, &b"hello world"[..]).unwrap();
/// } // drop our &mut reference so that we can use `buf` again
///
@@ -1069,6 +1069,6 @@ impl BufMut for Vec<u8> {
}
}
// The existance of this function makes the compiler catch if the BufMut
// The existence of this function makes the compiler catch if the BufMut
// trait is "object-safe" or not.
fn _assert_trait_object(_b: &dyn BufMut) {}
+1 -1
View File
@@ -5,7 +5,7 @@ use std::io::{IoSlice, IoSliceMut};
/// A `Chain` sequences two buffers.
///
/// `Chain` is an adapter that links two underlying buffers and provides a
/// continous view across both buffers. It is able to sequence either immutable
/// continuous view across both buffers. It is able to sequence either immutable
/// buffers ([`Buf`] values) or mutable buffers ([`BufMut`] values).
///
/// This struct is generally created by calling [`Buf::chain`]. Please see that