Skip to content

Commit 510050e

Browse files
committed
Add more types
1 parent 7a7f90c commit 510050e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/line-index/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ pub struct LineIndex {
9494
impl LineIndex {
9595
/// Returns a `LineIndex` for the `text`.
9696
pub fn new(text: &str) -> LineIndex {
97-
let mut newlines = Vec::with_capacity(16);
98-
let mut line_wide_chars = IntMap::default();
97+
let mut newlines = Vec::<TextSize>::with_capacity(16);
98+
let mut line_wide_chars = IntMap::<u32, Box<[WideChar]>>::default();
9999

100-
let mut wide_chars = Vec::new();
100+
let mut wide_chars = Vec::<WideChar>::new();
101101
let mut cur_row = TextSize::from(0);
102102
let mut cur_col = TextSize::from(0);
103-
let mut line = 0;
103+
let mut line = 0u32;
104104

105105
for c in text.chars() {
106106
let c_len = TextSize::of(c);

0 commit comments

Comments
 (0)