forked from extern/nushell
Remove the line primitive (#2887)
This commit is contained in:
@ -146,9 +146,6 @@ pub fn coerce_compare_primitive(
|
||||
}
|
||||
(Nothing, Nothing) => CompareValues::Booleans(true, true),
|
||||
(String(left), String(right)) => CompareValues::String(left.clone(), right.clone()),
|
||||
(Line(left), String(right)) => CompareValues::String(left.clone(), right.clone()),
|
||||
(String(left), Line(right)) => CompareValues::String(left.clone(), right.clone()),
|
||||
(Line(left), Line(right)) => CompareValues::String(left.clone(), right.clone()),
|
||||
(Date(left), Date(right)) => CompareValues::Date(*left, *right),
|
||||
(Date(left), Duration(right)) => CompareValues::DateDuration(*left, right.clone()),
|
||||
(Boolean(left), Boolean(right)) => CompareValues::Booleans(*left, *right),
|
||||
|
@ -71,7 +71,6 @@ impl InlineShape {
|
||||
Primitive::Decimal(decimal) => InlineShape::Decimal(decimal.clone()),
|
||||
Primitive::Filesize(bytesize) => InlineShape::Bytesize(*bytesize),
|
||||
Primitive::String(string) => InlineShape::String(string.clone()),
|
||||
Primitive::Line(string) => InlineShape::Line(string.clone()),
|
||||
Primitive::ColumnPath(path) => InlineShape::ColumnPath(path.clone()),
|
||||
Primitive::Pattern(pattern) => InlineShape::Pattern(pattern.clone()),
|
||||
Primitive::Boolean(boolean) => InlineShape::Boolean(*boolean),
|
||||
|
@ -83,7 +83,6 @@ fn helper(v: &Value) -> Result<toml::Value, ShellError> {
|
||||
}
|
||||
UntaggedValue::Primitive(Primitive::Pattern(s)) => toml::Value::String(s.clone()),
|
||||
UntaggedValue::Primitive(Primitive::String(s)) => toml::Value::String(s.clone()),
|
||||
UntaggedValue::Primitive(Primitive::Line(s)) => toml::Value::String(s.clone()),
|
||||
UntaggedValue::Primitive(Primitive::Path(s)) => {
|
||||
toml::Value::String(s.display().to_string())
|
||||
}
|
||||
|
@ -81,10 +81,6 @@ impl ExtractType for String {
|
||||
value: UntaggedValue::Primitive(Primitive::String(string)),
|
||||
..
|
||||
} => Ok(string.clone()),
|
||||
Value {
|
||||
value: UntaggedValue::Primitive(Primitive::Line(string)),
|
||||
..
|
||||
} => Ok(string.clone()),
|
||||
other => Err(ShellError::type_error("String", other.spanned_type_name())),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user