We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a7f90c commit 510050eCopy full SHA for 510050e
lib/line-index/src/lib.rs
@@ -94,13 +94,13 @@ pub struct LineIndex {
94
impl LineIndex {
95
/// Returns a `LineIndex` for the `text`.
96
pub fn new(text: &str) -> LineIndex {
97
- let mut newlines = Vec::with_capacity(16);
98
- let mut line_wide_chars = IntMap::default();
+ let mut newlines = Vec::<TextSize>::with_capacity(16);
+ let mut line_wide_chars = IntMap::<u32, Box<[WideChar]>>::default();
99
100
- let mut wide_chars = Vec::new();
+ let mut wide_chars = Vec::<WideChar>::new();
101
let mut cur_row = TextSize::from(0);
102
let mut cur_col = TextSize::from(0);
103
- let mut line = 0;
+ let mut line = 0u32;
104
105
for c in text.chars() {
106
let c_len = TextSize::of(c);
0 commit comments