Fix clippy: Remove unnecessary Ok + ? operator

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2022-12-29 18:36:14 +01:00 committed by Scott Boggs
parent 88ba4c0894
commit 5d445d2708
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ pub fn from_reader<R: Read>(mut r: R) -> Result<Data> {
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Data> { pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Data> {
let path = path.as_ref(); let path = path.as_ref();
let file = File::open(path)?; let file = File::open(path)?;
Ok(from_reader(file)?) from_reader(file)
} }
/// Attempts to serialize a Data struct to a String /// Attempts to serialize a Data struct to a String