handle errors
Some checks reported errors
continuous-integration/drone/tag Build encountered an error
continuous-integration/drone/push Build encountered an error

This commit is contained in:
shimunn 2019-09-07 23:44:05 +02:00
parent 3ea08410bb
commit acfe506f51
Signed by: shimun
GPG Key ID: E81D8382DC2F971B

View File

@ -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,