mirror of
https://github.com/nushell/nushell
synced 2025-01-15 14:44:14 +00:00
hopefully fixes the coercion error when comparing $nothing to $var (#3133)
This commit is contained in:
parent
c91a1ec08d
commit
983de8974b
2 changed files with 4 additions and 1 deletions
3
Cargo.lock
generated
3
Cargo.lock
generated
|
@ -2949,7 +2949,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "minus"
|
name = "minus"
|
||||||
version = "3.2.0"
|
version = "3.2.0"
|
||||||
source = "git+https://github.com/rezural/minus?branch=add-finished-callback#b943ed5c9143924ca1f871e4911a82c2e784001a"
|
source = "git+https://github.com/arijit79/minus?branch=main#eadb315644dcc051a0a3a7d4739bd59dfb37f0bd"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-std",
|
"async-std",
|
||||||
"crossterm 0.19.0",
|
"crossterm 0.19.0",
|
||||||
|
@ -3322,6 +3322,7 @@ dependencies = [
|
||||||
"chrono-tz",
|
"chrono-tz",
|
||||||
"clap",
|
"clap",
|
||||||
"codespan-reporting",
|
"codespan-reporting",
|
||||||
|
"crossterm 0.19.0",
|
||||||
"csv",
|
"csv",
|
||||||
"ctrlc",
|
"ctrlc",
|
||||||
"derive-new",
|
"derive-new",
|
||||||
|
|
|
@ -147,6 +147,8 @@ pub fn coerce_compare_primitive(
|
||||||
(Date(left), Date(right)) => CompareValues::Date(*left, *right),
|
(Date(left), Date(right)) => CompareValues::Date(*left, *right),
|
||||||
(Date(left), Duration(right)) => CompareValues::DateDuration(*left, right.clone()),
|
(Date(left), Duration(right)) => CompareValues::DateDuration(*left, right.clone()),
|
||||||
(Boolean(left), Boolean(right)) => CompareValues::Booleans(*left, *right),
|
(Boolean(left), Boolean(right)) => CompareValues::Booleans(*left, *right),
|
||||||
|
(Boolean(left), Nothing) => CompareValues::Booleans(*left, false),
|
||||||
|
(Nothing, Boolean(right)) => CompareValues::Booleans(false, *right),
|
||||||
(FilePath(left), String(right)) => {
|
(FilePath(left), String(right)) => {
|
||||||
CompareValues::String(left.as_path().display().to_string(), right.clone())
|
CompareValues::String(left.as_path().display().to_string(), right.clone())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue