forked from extern/nushell
Remove Value::MatchPattern
(#11356)
# Description `Value::MatchPattern` implies that `MatchPattern`s are first-class values. This PR removes this case, and commands must now instead use `Expr::MatchPattern` to extract `MatchPattern`s just like how the `match` command does using `Expr::MatchBlock`. # User-Facing Changes Breaking API change for `nu_protocol` crate.
This commit is contained in:
@ -290,7 +290,6 @@ fn describe_value(
|
||||
| Value::Date { .. }
|
||||
| Value::Range { .. }
|
||||
| Value::String { .. }
|
||||
| Value::MatchPattern { .. }
|
||||
| Value::Nothing { .. } => Value::record(
|
||||
record!(
|
||||
"type" => Value::string(value.get_type().to_string(), head),
|
||||
|
@ -278,9 +278,6 @@ impl<'a> std::fmt::Debug for DebuggableValue<'a> {
|
||||
let rec = val.collect().map_err(|_| std::fmt::Error)?;
|
||||
write!(f, "LazyRecord({:?})", DebuggableValue(&rec))
|
||||
}
|
||||
Value::MatchPattern { val, .. } => {
|
||||
write!(f, "MatchPattern({:?})", val)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user