File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1314,11 +1314,11 @@ impl ReliabilityReport {
1314
1314
}
1315
1315
1316
1316
pub fn score ( & self ) -> u32 {
1317
- if self . total_requests_sent == 0 {
1318
- return 0 ;
1317
+ let n = self . total_requests_sent ;
1318
+ if n == 0 {
1319
+ return n;
1319
1320
}
1320
- self . total_requests_success * 1000 / ( self . total_requests_sent * 1000 )
1321
- + self . total_requests_sent
1321
+ self . total_requests_success * 1000 / ( n * 1000 ) + n
1322
1322
}
1323
1323
}
1324
1324
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ impl StacksString {
207
207
// This is 0x20 through 0x7e, inclusive, as well as '\t' and '\n'
208
208
// TODO: DRY up with vm::representations
209
209
for c in s. as_bytes ( ) . iter ( ) {
210
- if ( * c < 0x20 && * c != ( b'\t' ) && * c != ( b'\n' ) ) || ( * c > 0x7e ) {
210
+ if ( * c < 0x20 && * c != b'\t' && * c != b'\n' ) || * c > 0x7e {
211
211
return false ;
212
212
}
213
213
}
You can’t perform that action at this time.
0 commit comments