about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAriel Davis <ariel.z.davis@icloud.com>2023-05-06 15:09:34 -0700
committerAriel Davis <ariel.z.davis@icloud.com>2023-05-06 15:09:34 -0700
commit510050ecdc5d7eede55533246e713fe847038af8 (patch)
treeccbd13029515363f69ebf9ea9981806a9f47506b
parent7a7f90cf28445b6f3d3545c51ae312f003e19064 (diff)
downloadrust-510050ecdc5d7eede55533246e713fe847038af8.tar.gz
rust-510050ecdc5d7eede55533246e713fe847038af8.zip
Add more types
-rw-r--r--lib/line-index/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/line-index/src/lib.rs b/lib/line-index/src/lib.rs
index 97a24bcf6fc..370bbf68f38 100644
--- a/lib/line-index/src/lib.rs
+++ b/lib/line-index/src/lib.rs
@@ -94,13 +94,13 @@ pub struct LineIndex {
 impl LineIndex {
     /// Returns a `LineIndex` for the `text`.
     pub fn new(text: &str) -> LineIndex {
-        let mut newlines = Vec::with_capacity(16);
-        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();
 
-        let mut wide_chars = Vec::new();
+        let mut wide_chars = Vec::<WideChar>::new();
         let mut cur_row = TextSize::from(0);
         let mut cur_col = TextSize::from(0);
-        let mut line = 0;
+        let mut line = 0u32;
 
         for c in text.chars() {
             let c_len = TextSize::of(c);