@@ -85,38 +85,44 @@ impl<A:IterBytes> Hash for A {
85
85
#[ inline]
86
86
fn hash_keyed ( & self , k0 : u64 , k1 : u64 ) -> u64 {
87
87
let mut s = State :: new ( k0, k1) ;
88
- for self . iter_bytes( true ) |bytes| {
88
+ do self. iter_bytes ( true ) |bytes| {
89
89
s. input ( bytes) ;
90
- }
90
+ true
91
+ } ;
91
92
s. result_u64 ( )
92
93
}
93
94
}
94
95
95
96
fn hash_keyed_2 < A : IterBytes ,
96
97
B : IterBytes > ( a : & A , b : & B , k0 : u64 , k1 : u64 ) -> u64 {
97
98
let mut s = State :: new ( k0, k1) ;
98
- for a. iter_bytes( true ) |bytes| {
99
+ do a. iter_bytes ( true ) |bytes| {
99
100
s. input ( bytes) ;
100
- }
101
- for b. iter_bytes( true ) |bytes| {
101
+ true
102
+ } ;
103
+ do b. iter_bytes ( true ) |bytes| {
102
104
s. input ( bytes) ;
103
- }
105
+ true
106
+ } ;
104
107
s. result_u64 ( )
105
108
}
106
109
107
110
fn hash_keyed_3 < A : IterBytes ,
108
111
B : IterBytes ,
109
112
C : IterBytes > ( a : & A , b : & B , c : & C , k0 : u64 , k1 : u64 ) -> u64 {
110
113
let mut s = State :: new ( k0, k1) ;
111
- for a. iter_bytes( true ) |bytes| {
114
+ do a. iter_bytes ( true ) |bytes| {
112
115
s. input ( bytes) ;
113
- }
114
- for b. iter_bytes( true ) |bytes| {
116
+ true
117
+ } ;
118
+ do b. iter_bytes ( true ) |bytes| {
115
119
s. input ( bytes) ;
116
- }
117
- for c. iter_bytes( true ) |bytes| {
120
+ true
121
+ } ;
122
+ do c. iter_bytes ( true ) |bytes| {
118
123
s. input ( bytes) ;
119
- }
124
+ true
125
+ } ;
120
126
s. result_u64 ( )
121
127
}
122
128
@@ -132,18 +138,22 @@ fn hash_keyed_4<A: IterBytes,
132
138
k1 : u64 )
133
139
-> u64 {
134
140
let mut s = State :: new ( k0, k1) ;
135
- for a. iter_bytes( true ) |bytes| {
141
+ do a. iter_bytes ( true ) |bytes| {
136
142
s. input ( bytes) ;
137
- }
138
- for b. iter_bytes( true ) |bytes| {
143
+ true
144
+ } ;
145
+ do b. iter_bytes ( true ) |bytes| {
139
146
s. input ( bytes) ;
140
- }
141
- for c. iter_bytes( true ) |bytes| {
147
+ true
148
+ } ;
149
+ do c. iter_bytes ( true ) |bytes| {
142
150
s. input ( bytes) ;
143
- }
144
- for d. iter_bytes( true ) |bytes| {
151
+ true
152
+ } ;
153
+ do d. iter_bytes ( true ) |bytes| {
145
154
s. input ( bytes) ;
146
- }
155
+ true
156
+ } ;
147
157
s. result_u64 ( )
148
158
}
149
159
@@ -161,21 +171,26 @@ fn hash_keyed_5<A: IterBytes,
161
171
k1 : u64 )
162
172
-> u64 {
163
173
let mut s = State :: new ( k0, k1) ;
164
- for a. iter_bytes( true ) |bytes| {
174
+ do a. iter_bytes ( true ) |bytes| {
165
175
s. input ( bytes) ;
166
- }
167
- for b. iter_bytes( true ) |bytes| {
176
+ true
177
+ } ;
178
+ do b. iter_bytes ( true ) |bytes| {
168
179
s. input ( bytes) ;
169
- }
170
- for c. iter_bytes( true ) |bytes| {
180
+ true
181
+ } ;
182
+ do c. iter_bytes ( true ) |bytes| {
171
183
s. input ( bytes) ;
172
- }
173
- for d. iter_bytes( true ) |bytes| {
184
+ true
185
+ } ;
186
+ do d. iter_bytes ( true ) |bytes| {
174
187
s. input ( bytes) ;
175
- }
176
- for e. iter_bytes( true ) |bytes| {
188
+ true
189
+ } ;
190
+ do e. iter_bytes ( true ) |bytes| {
177
191
s. input ( bytes) ;
178
- }
192
+ true
193
+ } ;
179
194
s. result_u64 ( )
180
195
}
181
196
0 commit comments