about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAriel Davis <ariel.z.davis@icloud.com>2023-05-06 15:44:37 -0700
committerAriel Davis <ariel.z.davis@icloud.com>2023-05-06 15:44:37 -0700
commit60056b884536c77df8b82834d253b2bc784c02e4 (patch)
treebe196fbbeb0fe8c5ffceb948ea9e1ddcc53aab41
parent9d4d45215a95c92f05189e51131c60c1d15702d4 (diff)
downloadrust-60056b884536c77df8b82834d253b2bc784c02e4.tar.gz
rust-60056b884536c77df8b82834d253b2bc784c02e4.zip
Expose len
-rw-r--r--lib/line-index/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/line-index/src/lib.rs b/lib/line-index/src/lib.rs
index aac5b156499..ad67d3f246e 100644
--- a/lib/line-index/src/lib.rs
+++ b/lib/line-index/src/lib.rs
@@ -229,4 +229,9 @@ impl LineIndex {
             .map(|(lo, hi)| TextRange::new(lo, hi))
             .filter(|it| !it.is_empty())
     }
+
+    /// Returns the length of the original text.
+    pub fn len(&self) -> TextSize {
+        self.len
+    }
 }