@@ -9,15 +9,6 @@ use nohash_hasher::IntMap;
9
9
10
10
pub use text_size:: { TextRange , TextSize } ;
11
11
12
- /// Maps flat [`TextSize`] offsets into `(line, column)` representation.
13
- #[ derive( Clone , Debug , PartialEq , Eq ) ]
14
- pub struct LineIndex {
15
- /// Offset the beginning of each line, zero-based.
16
- newlines : Box < [ TextSize ] > ,
17
- /// List of non-ASCII characters on each line.
18
- line_wide_chars : IntMap < u32 , Box < [ WideChar ] > > ,
19
- }
20
-
21
12
/// Line/Column information in native, utf8 format.
22
13
#[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash ) ]
23
14
pub struct LineCol {
@@ -77,6 +68,15 @@ impl WideChar {
77
68
}
78
69
}
79
70
71
+ /// Maps flat [`TextSize`] offsets into `(line, column)` representation.
72
+ #[ derive( Clone , Debug , PartialEq , Eq ) ]
73
+ pub struct LineIndex {
74
+ /// Offset the beginning of each line, zero-based.
75
+ newlines : Box < [ TextSize ] > ,
76
+ /// List of non-ASCII characters on each line.
77
+ line_wide_chars : IntMap < u32 , Box < [ WideChar ] > > ,
78
+ }
79
+
80
80
impl LineIndex {
81
81
/// Returns a `LineIndex` for the `text`.
82
82
pub fn new ( text : & str ) -> LineIndex {
0 commit comments