File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff 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 ) ) ]
7070pub struct ValueWithSpan {
@@ -80,7 +80,13 @@ impl PartialEq for ValueWithSpan {
8080
8181impl 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
You can’t perform that action at this time.
0 commit comments