File tree 1 file changed +14
-15
lines changed
src/librustdoc/html/render/search_index
1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -92,24 +92,23 @@ impl Container {
92
92
r += !chunk & u64:: from ( ( chunk << 1 ) . count_ones ( ) ) ;
93
93
r += !next_chunk & u64:: from ( ( chunk >> 63 ) . count_ones ( ) ) ;
94
94
}
95
- if ( 2 + 4 * r) < 8192 {
96
- let bits = std:: mem:: replace ( bits, Box :: new ( [ 0 ; 1024 ] ) ) ;
97
- * self = Container :: Run ( Vec :: new ( ) ) ;
98
- for ( i, bits) in bits. iter ( ) . copied ( ) . enumerate ( ) {
99
- if bits == 0 {
100
- continue ;
101
- }
102
- for j in 0 ..64 {
103
- let value = ( u16:: try_from ( i) . unwrap ( ) << 6 ) | j;
104
- if bits & ( 1 << j) != 0 {
105
- self . push ( value) ;
106
- }
95
+ if ( 2 + 4 * r) >= 8192 {
96
+ return false ;
97
+ }
98
+ let bits = std:: mem:: replace ( bits, Box :: new ( [ 0 ; 1024 ] ) ) ;
99
+ * self = Container :: Run ( Vec :: new ( ) ) ;
100
+ for ( i, bits) in bits. iter ( ) . copied ( ) . enumerate ( ) {
101
+ if bits == 0 {
102
+ continue ;
103
+ }
104
+ for j in 0 ..64 {
105
+ let value = ( u16:: try_from ( i) . unwrap ( ) << 6 ) | j;
106
+ if bits & ( 1 << j) != 0 {
107
+ self . push ( value) ;
107
108
}
108
109
}
109
- true
110
- } else {
111
- false
112
110
}
111
+ true
113
112
}
114
113
Container :: Array ( array) if array. len ( ) <= 5 => false ,
115
114
Container :: Array ( array) => {
You can’t perform that action at this time.
0 commit comments