mirror of
https://github.com/serde-rs/json.git
synced 2025-11-07 00:43:14 +00:00
Merge pull request #744 from Carreau/patch-1
Update example to use Result<User, Box<dyn Error>>
This commit is contained in:
commit
7ff8ec6e8d
@ -2432,7 +2432,7 @@ where
|
|||||||
/// location: String,
|
/// 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.
|
/// // Open the file in read-only mode with buffer.
|
||||||
/// let file = File::open(path)?;
|
/// let file = File::open(path)?;
|
||||||
/// let reader = BufReader::new(file);
|
/// let reader = BufReader::new(file);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user