File tree Expand file tree Collapse file tree 1 file changed +6
-20
lines changed Expand file tree Collapse file tree 1 file changed +6
-20
lines changed Original file line number Diff line number Diff line change @@ -294,33 +294,19 @@ impl<const N: usize> Deref for CString<N> {
294
294
}
295
295
}
296
296
297
- impl < const N : usize , T : AsRef < CStr > > PartialEq < T > for CString < N > {
297
+ impl < const N : usize , const M : usize > PartialEq < CString < M > > for CString < N > {
298
298
#[ inline]
299
- fn eq ( & self , rhs : & T ) -> bool {
300
- self . as_c_str ( ) == rhs. as_ref ( )
301
- }
302
- }
303
-
304
- impl < const N : usize > PartialEq < CString < N > > for CStr {
305
- #[ inline]
306
- fn eq ( & self , rhs : & CString < N > ) -> bool {
307
- self == rhs. as_c_str ( )
308
- }
309
- }
310
-
311
- impl < const N : usize > PartialEq < CString < N > > for & CStr {
312
- #[ inline]
313
- fn eq ( & self , rhs : & CString < N > ) -> bool {
314
- * self == rhs. as_c_str ( )
299
+ fn eq ( & self , rhs : & CString < M > ) -> bool {
300
+ self . as_c_str ( ) == rhs. as_c_str ( )
315
301
}
316
302
}
317
303
318
304
impl < const N : usize > Eq for CString < N > { }
319
305
320
- impl < const N : usize , T : AsRef < CStr > > PartialOrd < T > for CString < N > {
306
+ impl < const N : usize , const M : usize > PartialOrd < CString < M > > for CString < N > {
321
307
#[ inline]
322
- fn partial_cmp ( & self , rhs : & T ) -> Option < Ordering > {
323
- self . as_c_str ( ) . partial_cmp ( rhs. as_ref ( ) )
308
+ fn partial_cmp ( & self , rhs : & CString < M > ) -> Option < Ordering > {
309
+ self . as_c_str ( ) . partial_cmp ( rhs. as_c_str ( ) )
324
310
}
325
311
}
326
312
You can’t perform that action at this time.
0 commit comments