Skip to content

Commit 66bed65

Browse files
committed
fix clippy
1 parent 4435d3f commit 66bed65

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/ast/value.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use crate::{ast::Ident, tokenizer::Span};
3131
use sqlparser_derive::{Visit, VisitMut};
3232

3333
/// Primitive SQL values such as number and string
34-
#[derive(Debug, Clone, Eq, Ord)]
34+
#[derive(Debug, Clone, Eq)]
3535
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3636
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
3737
pub struct ValueWithSpan {
@@ -51,6 +51,12 @@ impl PartialOrd for ValueWithSpan {
5151
}
5252
}
5353

54+
impl Ord for ValueWithSpan {
55+
fn cmp(&self, other: &Self) -> core::cmp::Ordering {
56+
self.value.cmp(&other.value)
57+
}
58+
}
59+
5460
impl core::hash::Hash for ValueWithSpan {
5561
fn hash<H: core::hash::Hasher>(&self, state: &mut H) {
5662
self.value.hash(state);

0 commit comments

Comments
 (0)