hopefully fixes the coercion error when comparing $nothing to $var (#3133)

This commit is contained in:
Darren Schroeder
2021-03-05 14:07:54 -06:00
committed by GitHub
parent c91a1ec08d
commit 983de8974b
2 changed files with 4 additions and 1 deletions

View File

@ -147,6 +147,8 @@ pub fn coerce_compare_primitive(
(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),
(Boolean(left), Nothing) => CompareValues::Booleans(*left, false),
(Nothing, Boolean(right)) => CompareValues::Booleans(false, *right),
(FilePath(left), String(right)) => {
CompareValues::String(left.as_path().display().to_string(), right.clone())
}