summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openpgp/src/packet/userid.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/openpgp/src/packet/userid.rs b/openpgp/src/packet/userid.rs
index e9721d39..f4b8ae5f 100644
--- a/openpgp/src/packet/userid.rs
+++ b/openpgp/src/packet/userid.rs
@@ -74,6 +74,13 @@ impl<'a> From<&'a str> for UserID {
}
}
+impl From<String> for UserID {
+ fn from(u: String) -> Self {
+ let u = &u[..];
+ u.into()
+ }
+}
+
impl<'a> From<::std::borrow::Cow<'a, str>> for UserID {
fn from(u: ::std::borrow::Cow<'a, str>) -> Self {
let b = u.as_bytes();