0.1.3 - update lock file, add archive function for package, remove warnings

parent 333b664a
This diff is collapsed.
[package]
name = "redox_pkgutils"
version = "0.1.2"
version = "0.1.3"
description = "Redox Packaging Utilities"
license = "MIT"
authors = ["Jeremy Soller <jackpot51@gmail.com>"]
......
......@@ -46,7 +46,7 @@ impl error::Error for DatabaseError {
}
}
fn cause(&self) -> Option<&error::Error> {
fn cause(&self) -> Option<&dyn error::Error> {
match *self {
DatabaseError::Io(ref err) => Some(err),
DatabaseError::Toml(ref err) => Some(err),
......
......@@ -24,7 +24,7 @@ impl Package {
Ok(Package{archive: ar, path: path.as_ref().to_path_buf(), meta: None})
}
pub fn install(&mut self, dest: &str)-> io::Result<()> {
pub fn install<P: AsRef<Path>>(&mut self, dest: P)-> io::Result<()> {
self.archive.unpack(dest)?;
Ok(())
}
......@@ -36,6 +36,10 @@ impl Package {
Ok(())
}
pub fn archive(&self) -> &Archive<Decoder<BufReader<File>>> {
&self.archive
}
pub fn path(&self) -> &Path {
&self.path
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment