Skip to content

Commit f0268c9

Browse files
committed
Fix clippy
1 parent d6116af commit f0268c9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ast/value.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ use sqlparser_derive::{Visit, VisitMut};
6464
/// // convert back to `Value`
6565
/// let value: Value = value_with_span.into();
6666
/// ```
67-
#[derive(Debug, Clone, Eq, Ord)]
67+
#[derive(Debug, Clone, Eq)]
6868
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6969
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
7070
pub struct ValueWithSpan {
@@ -80,7 +80,13 @@ impl PartialEq for ValueWithSpan {
8080

8181
impl PartialOrd for ValueWithSpan {
8282
fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
83-
self.value.partial_cmp(&other.value)
83+
Some(self.cmp(other))
84+
}
85+
}
86+
87+
impl Ord for ValueWithSpan {
88+
fn cmp(&self, other: &Self) -> core::cmp::Ordering {
89+
self.value.cmp(&other.value)
8490
}
8591
}
8692

0 commit comments

Comments
 (0)