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 b47e435b49
commit 88ba4c0894
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> {
let path = path.as_ref();
let file = File::open(path)?;
Ok(from_reader(file)?)
from_reader(file)
}
/// Attempts to serialize a Data struct to a String