mirror of
https://github.com/nushell/nushell.git
synced 2025-08-11 05:44:22 +02:00
Make comparisons/sort-by more 'global' (#4500)
* Make comparisons/sort-by more 'global' * Let custom values do their own comparisons
This commit is contained in:
@ -2,7 +2,7 @@ use super::Expression;
|
||||
use crate::Span;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, PartialOrd, Serialize, Deserialize)]
|
||||
pub enum PathMember {
|
||||
String { val: String, span: Span },
|
||||
Int { val: usize, span: Span },
|
||||
@ -18,7 +18,7 @@ impl PartialEq for PathMember {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, PartialEq, PartialOrd, Serialize, Deserialize)]
|
||||
pub struct CellPath {
|
||||
pub members: Vec<PathMember>,
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ impl Display for Operator {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Serialize, Deserialize)]
|
||||
pub enum RangeInclusion {
|
||||
Inclusive,
|
||||
RightExclusive,
|
||||
|
Reference in New Issue
Block a user