File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ macro_rules! string_impl {
250
250
251
251
impl PartialOrd for $string {
252
252
fn partial_cmp( & self , other: & Self ) -> Option <Ordering > {
253
- self . deref ( ) . partial_cmp ( other. deref ( ) )
253
+ Some ( self . cmp ( other) )
254
254
}
255
255
}
256
256
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ impl Serialize for WString {
125
125
{
126
126
// Not particularly efficient
127
127
// SAFETY: See the Display implementation.
128
- let u16_slice = unsafe { std:: slice:: from_raw_parts ( self . data as * mut u16 , self . size ) } ;
128
+ let u16_slice = unsafe { std:: slice:: from_raw_parts ( self . data , self . size ) } ;
129
129
let s = std:: string:: String :: from_utf16_lossy ( u16_slice) ;
130
130
serializer. serialize_str ( & s)
131
131
}
You can’t perform that action at this time.
0 commit comments