Skip to content

Commit

Permalink
Fix open function
Browse files Browse the repository at this point in the history
  • Loading branch information
ikrivosheev committed Mar 8, 2023
1 parent 6f51dfe commit 7c00230
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/rpm/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@ where
}

/// Open and parse a file at the provided path as an RPM package.
pub fn open<P: AsRef<Path>>(path: P) -> Result<RPMPackage<io::BufReader<File>>, RPMError> {
pub fn open<P: AsRef<Path>>(path: P) -> Result<RPMPackage<File>, RPMError> {
let rpm_file = File::open(path.as_ref())?;
let buf_reader = io::BufReader::new(rpm_file);
RPMPackage::parse(buf_reader)
RPMPackage::parse(rpm_file)
}

impl<R> RPMPackage<R>
Expand Down

0 comments on commit 7c00230

Please sign in to comment.