Add (near) automatic testing for command examples (#1777)

This commit is contained in:
Jason Gedge
2020-05-18 08:56:01 -04:00
committed by GitHub
parent 3fc4a9f142
commit acf13a6fcf
119 changed files with 1935 additions and 282 deletions

View File

@ -171,6 +171,20 @@ impl std::ops::Mul for Primitive {
}
}
impl From<&str> for Primitive {
/// Helper to convert from string slices to a primitive
fn from(s: &str) -> Primitive {
Primitive::String(s.to_string())
}
}
impl From<String> for Primitive {
/// Helper to convert from Strings to a primitive
fn from(s: String) -> Primitive {
Primitive::String(s)
}
}
impl From<BigDecimal> for Primitive {
/// Helper to convert from decimals to a Primitive value
fn from(decimal: BigDecimal) -> Primitive {