Merge pull request #744 from Carreau/patch-1

Update example to use Result<User, Box<dyn Error>>
This commit is contained in:
David Tolnay 2021-01-10 12:04:31 -08:00 committed by GitHub
commit 7ff8ec6e8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2432,7 +2432,7 @@ where
/// location: String,
/// }
///
/// fn read_user_from_file<P: AsRef<Path>>(path: P) -> Result<User, Box<Error>> {
/// fn read_user_from_file<P: AsRef<Path>>(path: P) -> Result<User, Box<dyn Error>> {
/// // Open the file in read-only mode with buffer.
/// let file = File::open(path)?;
/// let reader = BufReader::new(file);