aboutsummaryrefslogtreecommitdiff
path: root/src/primitive
diff options
context:
space:
mode:
Diffstat (limited to 'src/primitive')
-rw-r--r--src/primitive/variant.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/primitive/variant.rs b/src/primitive/variant.rs
index 92e3211..3b41b7b 100644
--- a/src/primitive/variant.rs
+++ b/src/primitive/variant.rs
@@ -77,6 +77,12 @@ impl From<String> for Variant {
}
}
+impl From<&str> for Variant {
+ fn from(input: &str) -> Self {
+ Self::String(input.to_owned())
+ }
+}
+
/// Implements the Network trait genericly for everything that
/// can be a VariantList / Vec<T>
impl<T> crate::message::Network for Vec<T>