handle errors
This commit is contained in:
parent
3ea08410bb
commit
acfe506f51
@ -38,8 +38,7 @@ impl KnownKeys {
|
|||||||
let mut content = Vec::with_capacity(2048);
|
let mut content = Vec::with_capacity(2048);
|
||||||
let helper = &*self;
|
let helper = &*self;
|
||||||
let mut v = Verifier::<&KnownKeys>::from_reader(r, helper, None)
|
let mut v = Verifier::<&KnownKeys>::from_reader(r, helper, None)
|
||||||
.map_err(|e| dbg!(e))
|
.map_err(|e| io::Error::new(io::ErrorKind::InvalidData, "Failed to verify signature"))?;
|
||||||
.unwrap();
|
|
||||||
if v.read_to_end(&mut content).is_err() {
|
if v.read_to_end(&mut content).is_err() {
|
||||||
return Err(io::Error::new(
|
return Err(io::Error::new(
|
||||||
io::ErrorKind::InvalidData,
|
io::ErrorKind::InvalidData,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user