mirror of
https://github.com/nushell/nushell
synced 2024-12-28 05:53:09 +00:00
Fix Range::contains
This commit is contained in:
parent
4235cf1191
commit
5f9ad0947d
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ impl Range {
|
|||
pub fn contains(&self, item: &Value) -> bool {
|
||||
match (item.partial_cmp(&self.from), item.partial_cmp(&self.to)) {
|
||||
(Some(Ordering::Greater | Ordering::Equal), Some(Ordering::Less)) => self.moves_up(),
|
||||
(Some(Ordering::Less | Ordering::Equal), Some(Ordering::Greater)) => self.moves_up(),
|
||||
(Some(Ordering::Less | Ordering::Equal), Some(Ordering::Greater)) => !self.moves_up(),
|
||||
(Some(_), Some(Ordering::Equal)) => self.is_end_inclusive(),
|
||||
(_, _) => false,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue