mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
Fix nothing string comparison (#3750)
This commit is contained in:
@ -164,6 +164,10 @@ pub fn coerce_compare_primitive(
|
||||
(Boolean(left), Boolean(right)) => CompareValues::Booleans(*left, *right),
|
||||
(Boolean(left), Nothing) => CompareValues::Booleans(*left, false),
|
||||
(Nothing, Boolean(right)) => CompareValues::Booleans(false, *right),
|
||||
(String(left), Nothing) => CompareValues::String(left.clone(), std::string::String::new()),
|
||||
(Nothing, String(right)) => {
|
||||
CompareValues::String(std::string::String::new(), right.clone())
|
||||
}
|
||||
(FilePath(left), String(right)) => {
|
||||
CompareValues::String(left.as_path().display().to_string(), right.clone())
|
||||
}
|
||||
|
Reference in New Issue
Block a user