Skip to content

Commit

Permalink
revert change to load_sig
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Aug 18, 2024
1 parent e9fc1c2 commit 603fa0b
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/core/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,19 +297,12 @@ impl Storage for FSStorage {
}

fn load_sig(&self, path: &str) -> Result<SigStore> {
let sig = match self.load(path) {
Ok(raw) => {
let sig = Signature::from_reader(&mut &raw[..])?
.swap_remove(0)
.into();
sig
},
Err(_) => {
todo!("cannot load from path '{path}'")
}
};
let raw = self.load(path)?;
let sig = Signature::from_reader(&mut &raw[..])?
// TODO: select the right sig?
.swap_remove(0);

Ok(sig)
Ok(sig.into())
}

fn spec(&self) -> String {
Expand Down

0 comments on commit 603fa0b

Please sign in to comment.