Skip to content

Commit aef9a5d

Browse files
committed
fix lint/test
1 parent 7682f55 commit aef9a5d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/string-offsets/src/bitrank.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ mod tests {
246246
let br3 = bitrank(BITS_PER_BLOCK + 6, bits3);
247247
assert_eq!(br3.rank(BITS_PER_BLOCK), BITS_PER_BLOCK);
248248

249-
let bits4: Vec<usize> = vec![1, 1000, 9999, BITS_PER_BLOCK + 1];
249+
let bits4: Vec<usize> = vec![1, 1000, 7777, BITS_PER_BLOCK + 1];
250250
let br4 = bitrank(BITS_PER_BLOCK + 1, bits4);
251-
assert_eq!(br4.rank(10000), 3);
251+
assert_eq!(br4.rank(8000), 3);
252252

253-
let bits5: Vec<usize> = vec![1, 1000, 9999, BITS_PER_BLOCK + 1];
253+
let bits5: Vec<usize> = vec![1, 1000, 7777, BITS_PER_BLOCK + 1];
254254
let br5 = bitrank(BITS_PER_BLOCK + 1, bits5);
255255
assert_eq!(br5.rank(BITS_PER_BLOCK), 3);
256256
}

crates/string-offsets/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ fn new_converter(content: &[u8]) -> StringOffsets {
375375
let mut line_begins = vec![0];
376376
let mut whitespace_only = vec![];
377377
let mut only_whitespaces = true; // true if all characters in the current line are whitespaces.
378-
for (i, &c) in content.into_iter().enumerate() {
378+
for (i, &c) in content.iter().enumerate() {
379379
// Note: We expect here proper utf8 encoded strings! Otherwise, the conversion will have undefined behaviour.
380380
if is_char_boundary(c) {
381381
utf8_builder.push(i);

0 commit comments

Comments
 (0)