mirror of
https://github.com/serde-rs/json.git
synced 2025-10-02 15:26:00 +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,
|
||||
/// }
|
||||
///
|
||||
/// 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user