mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 00:54:56 +02:00
Make 'for' implicitly filter out nothings (#4536)
* Make 'for' implicitly filter out nothings * Fix test
This commit is contained in:
@ -562,6 +562,10 @@ impl Value {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_nothing(&self) -> bool {
|
||||
matches!(self, Value::Nothing { .. })
|
||||
}
|
||||
|
||||
/// Create a new `Nothing` value
|
||||
pub fn nothing(span: Span) -> Value {
|
||||
Value::Nothing { span }
|
||||
|
Reference in New Issue
Block a user