Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | Cargo.lock | 2 | ||||
| -rw-r--r-- | Cargo.toml | 8 | ||||
| -rw-r--r-- | lib/line-index/Cargo.toml | 4 | ||||
| -rw-r--r-- | lib/line-index/src/lib.rs | 4 |
4 files changed, 11 insertions, 7 deletions
diff --git a/Cargo.lock b/Cargo.lock index f20cba9865..4b22a58e56 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -919,7 +919,7 @@ version = "0.0.0" [[package]] name = "line-index" -version = "0.1.0" +version = "0.1.0-pre.1" dependencies = [ "nohash-hasher", "text-size", diff --git a/Cargo.toml b/Cargo.toml index 123b06e0cc..c7b0228e33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,10 +74,14 @@ toolchain = { path = "./crates/toolchain", version = "0.0.0" } tt = { path = "./crates/tt", version = "0.0.0" } vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" } vfs = { path = "./crates/vfs", version = "0.0.0" } -line-index = { version = "0.1.0", path = "./lib/line-index" } +line-index = { version = "0.1.0-pre.1", path = "./lib/line-index" } # non-local crates -smallvec = { version = "1.10.0", features = ["const_new", "union", "const_generics"] } +smallvec = { version = "1.10.0", features = [ + "const_new", + "union", + "const_generics", +] } smol_str = "0.2.0" nohash-hasher = "0.2.0" text-size = "1.1.0" diff --git a/lib/line-index/Cargo.toml b/lib/line-index/Cargo.toml index b08a55854e..019ad3a53b 100644 --- a/lib/line-index/Cargo.toml +++ b/lib/line-index/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "line-index" -version = "0.1.0" -description = "Maps flat `TextSize` offsets into `(line, column)` representation." +version = "0.1.0-pre.1" +description = "Maps flat `TextSize` offsets to/from `(line, column)` representation." license = "MIT OR Apache-2.0" repository = "https://github.com/rust-lang/rust-analyzer/tree/master/lib/line-index" edition = "2021" diff --git a/lib/line-index/src/lib.rs b/lib/line-index/src/lib.rs index 40815bdcf1..463227900d 100644 --- a/lib/line-index/src/lib.rs +++ b/lib/line-index/src/lib.rs @@ -79,8 +79,8 @@ impl WideChar { } } -/// Maps flat [`TextSize`] offsets into `(line, column)` representation. -#[derive(Clone, Debug, PartialEq, Eq)] +/// Maps flat [`TextSize`] offsets to/from `(line, column)` representation. +#[derive(Debug, Clone, PartialEq, Eq)] pub struct LineIndex { /// Offset the beginning of each line, zero-based. newlines: Box<[TextSize]>, |