Skip to content

Commit 59b4916

Browse files
committed
Swap
1 parent 663e11c commit 59b4916

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/line-index/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ use nohash_hasher::IntMap;
99

1010
pub use text_size::{TextRange, TextSize};
1111

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-
2112
/// Line/Column information in native, utf8 format.
2213
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2314
pub struct LineCol {
@@ -77,6 +68,15 @@ impl WideChar {
7768
}
7869
}
7970

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+
8080
impl LineIndex {
8181
/// Returns a `LineIndex` for the `text`.
8282
pub fn new(text: &str) -> LineIndex {

0 commit comments

Comments
 (0)