From fd7609de81d6cab790816d1ad6982ba305eca6ba Mon Sep 17 00:00:00 2001 From: Tpt Date: Mon, 18 Feb 2019 16:30:47 +0100 Subject: [PATCH] Adds impl From> for Literal --- lib/src/model/literal.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/model/literal.rs b/lib/src/model/literal.rs index 0be4c314..e99d0efa 100644 --- a/lib/src/model/literal.rs +++ b/lib/src/model/literal.rs @@ -405,6 +405,12 @@ impl From for Literal { } } +impl<'a> From> for Literal { + fn from(value: Cow<'a, str>) -> Self { + Literal(LiteralContent::String(value.into())) + } +} + impl From for Literal { fn from(value: bool) -> Self { Literal(LiteralContent::Boolean(value))