11// SPDX-License-Identifier: Apache-2.0
22// SPDX-FileCopyrightText: Copyright the Vortex contributors
33
4+ use std:: cmp;
5+ use std:: fmt;
46use std:: fmt:: Display ;
57use std:: fmt:: Formatter ;
68use std:: sync:: Arc ;
@@ -30,10 +32,11 @@ pub struct Utf8Scalar<'a> {
3032}
3133
3234impl Display for Utf8Scalar < ' _ > {
33- fn fmt ( & self , f : & mut Formatter < ' _ > ) -> std:: fmt:: Result {
35+ fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
36+ #[ expect( clippy:: use_debug, reason = "Escape escape sequences" ) ]
3437 match & self . value {
3538 None => write ! ( f, "null" ) ,
36- Some ( v) => write ! ( f, "\" {}\" " , v. as_str( ) ) ,
39+ Some ( v) => write ! ( f, "\" {:? }\" " , v. as_str( ) ) ,
3740 }
3841 }
3942}
@@ -45,13 +48,13 @@ impl PartialEq for Utf8Scalar<'_> {
4548}
4649
4750impl PartialOrd for Utf8Scalar < ' _ > {
48- fn partial_cmp ( & self , other : & Self ) -> Option < std :: cmp:: Ordering > {
51+ fn partial_cmp ( & self , other : & Self ) -> Option < cmp:: Ordering > {
4952 Some ( self . cmp ( other) )
5053 }
5154}
5255
5356impl Ord for Utf8Scalar < ' _ > {
54- fn cmp ( & self , other : & Self ) -> std :: cmp:: Ordering {
57+ fn cmp ( & self , other : & Self ) -> cmp:: Ordering {
5558 self . value . cmp ( & other. value )
5659 }
5760}
0 commit comments