Incorporate dyn into more comments and docs.

This commit is contained in:
Corey Farwell
2018-11-20 09:34:15 -05:00
parent 7a0cef74a8
commit 033cbfec4d
9 changed files with 19 additions and 18 deletions

View File

@@ -256,7 +256,7 @@ fn initial_buffer_size(file: &File) -> usize {
/// use std::fs;
/// use std::net::SocketAddr;
///
/// fn main() -> Result<(), Box<std::error::Error + 'static>> {
/// fn main() -> Result<(), Box<dyn std::error::Error + 'static>> {
/// let foo: SocketAddr = String::from_utf8_lossy(&fs::read("address.txt")?).parse()?;
/// Ok(())
/// }
@@ -298,7 +298,7 @@ pub fn read<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
/// use std::fs;
/// use std::net::SocketAddr;
///
/// fn main() -> Result<(), Box<std::error::Error + 'static>> {
/// fn main() -> Result<(), Box<dyn std::error::Error + 'static>> {
/// let foo: SocketAddr = fs::read_to_string("address.txt")?.parse()?;
/// Ok(())
/// }