summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-09-10 16:14:29 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-09-10 16:18:00 +0200
commit1ce4cc737838f7c4c1848a0ea6933ee750bd69d6 (patch)
tree9941a2de2add57ac6ca7a77eb71fd4d6e8777a44 /openpgp/src/parse
parentdfa4d60f436dfb23896b43766d159bde744ee981 (diff)
openpgp: Implement TryFrom<&'a Signature> for OnePassSig3.
Diffstat (limited to 'openpgp/src/parse')
-rw-r--r--openpgp/src/parse/stream.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs
index f75e89bf..cc11e0d9 100644
--- a/openpgp/src/parse/stream.rs
+++ b/openpgp/src/parse/stream.rs
@@ -10,6 +10,7 @@
//! [verification example]: struct.Verifier.html#example
use std::cmp;
+use std::convert::TryFrom;
use std::collections::HashMap;
use std::io::{self, Read};
use std::path::Path;
@@ -750,7 +751,7 @@ impl<'a> Transformer<'a> {
let mut buf = Vec::new();
for (i, sig) in sigs.iter().rev().enumerate() {
- let mut ops = Result::<OnePassSig3>::from(sig)?;
+ let mut ops = OnePassSig3::try_from(sig)?;
if i == sigs.len() - 1 {
ops.set_last(true);
}