Adds impl From<Cow<str>> for Literal

pull/10/head
Tpt 6 years ago
parent 25397c5751
commit fd7609de81
  1. 6
      lib/src/model/literal.rs

@ -405,6 +405,12 @@ impl From<String> for Literal {
} }
} }
impl<'a> From<Cow<'a, str>> for Literal {
fn from(value: Cow<'a, str>) -> Self {
Literal(LiteralContent::String(value.into()))
}
}
impl From<bool> for Literal { impl From<bool> for Literal {
fn from(value: bool) -> Self { fn from(value: bool) -> Self {
Literal(LiteralContent::Boolean(value)) Literal(LiteralContent::Boolean(value))

Loading…
Cancel
Save