diff --git a/src/package.rs b/src/package.rs index 6415f08..3661fa5 100644 --- a/src/package.rs +++ b/src/package.rs @@ -34,6 +34,11 @@ impl Package { }) } + /// Returns file path of the package. + pub fn file_path(&self) -> &Path { + &self.file_path + } + /// Returns [`PkgManifest`] for this package. pub fn manifest(&self) -> Result { PkgManifest::read_at(self.extracted_dir.path().join(PkgManifest::FILENAME)) @@ -316,8 +321,8 @@ impl FromStr for ConceptIdent { .map(|(a, b)| (a, Some(b))) .unwrap_or((s, None)); Ok(Self { - name: name.into(), - arch: arch.map(Into::into), + name: name.trim().into(), + arch: arch.map(|x| x.trim().into()), }) } }