mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-12-01 11:23:55 +01:00
refactor to pass slices around and not &Vec<> (#498)
cleaned up a couple of unwrap() calls
This commit is contained in:
@@ -47,7 +47,7 @@ impl<'a> PathToSlatepack<'a> {
|
||||
|
||||
pub fn get_slatepack(&self, decrypt: bool) -> Result<Slatepack, Error> {
|
||||
let data = self.get_slatepack_file_contents()?;
|
||||
self.packer.deser_slatepack(data, decrypt)
|
||||
self.packer.deser_slatepack(&data, decrypt)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ impl<'a> SlatePutter for PathToSlatepack<'a> {
|
||||
impl<'a> SlateGetter for PathToSlatepack<'a> {
|
||||
fn get_tx(&self) -> Result<(Slate, bool), Error> {
|
||||
let data = self.get_slatepack_file_contents()?;
|
||||
let slatepack = self.packer.deser_slatepack(data, true)?;
|
||||
let slatepack = self.packer.deser_slatepack(&data, true)?;
|
||||
Ok((self.packer.get_slate(&slatepack)?, true))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user