File tree 3 files changed +7
-18
lines changed
3 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -245,10 +245,10 @@ pub mod levenshtein {
245
245
if a == b {
246
246
return 0 ;
247
247
}
248
- if ( b'A' ..= b'Z' ) . contains ( & a ) {
248
+ if a . is_ascii_uppercase ( ) {
249
249
a += b'a' - b'A' ;
250
250
}
251
- if ( b'A' ..= b'Z' ) . contains ( & b ) {
251
+ if b . is_ascii_uppercase ( ) {
252
252
b += b'a' - b'A' ;
253
253
}
254
254
if a == b {
Original file line number Diff line number Diff line change 1
1
[toolchain ]
2
- channel = " 1.67.1 "
2
+ channel = " stable "
Original file line number Diff line number Diff line change @@ -1879,22 +1879,16 @@ mod _io {
1879
1879
write_through : bool ,
1880
1880
}
1881
1881
1882
- #[ derive( Debug , Copy , Clone ) ]
1882
+ #[ derive( Debug , Copy , Clone , Default ) ]
1883
1883
enum Newlines {
1884
+ #[ default]
1884
1885
Universal ,
1885
1886
Passthrough ,
1886
1887
Lf ,
1887
1888
Cr ,
1888
1889
Crlf ,
1889
1890
}
1890
1891
1891
- impl Default for Newlines {
1892
- #[ inline]
1893
- fn default ( ) -> Self {
1894
- Newlines :: Universal
1895
- }
1896
- }
1897
-
1898
1892
impl Newlines {
1899
1893
/// returns position where the new line starts if found, otherwise position at which to
1900
1894
/// continue the search after more is read into the buffer
@@ -2054,8 +2048,9 @@ mod _io {
2054
2048
data : PendingWritesData ,
2055
2049
}
2056
2050
2057
- #[ derive( Debug ) ]
2051
+ #[ derive( Debug , Default ) ]
2058
2052
enum PendingWritesData {
2053
+ #[ default]
2059
2054
None ,
2060
2055
One ( PendingWrite ) ,
2061
2056
Many ( Vec < PendingWrite > ) ,
@@ -2076,12 +2071,6 @@ mod _io {
2076
2071
}
2077
2072
}
2078
2073
2079
- impl Default for PendingWritesData {
2080
- fn default ( ) -> Self {
2081
- PendingWritesData :: None
2082
- }
2083
- }
2084
-
2085
2074
impl PendingWrites {
2086
2075
fn push ( & mut self , write : PendingWrite ) {
2087
2076
self . num_bytes += write. as_bytes ( ) . len ( ) ;
You can’t perform that action at this time.
0 commit comments