mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 10:38:07 +02:00
Add (near) automatic testing for command examples (#1777)
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user