diff options
author | Norbert Preining <norbert@preining.info> | 2021-05-23 03:00:39 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-05-23 03:00:39 +0000 |
commit | f1261b349e875b842745b63258c3e338cb1fe3bf (patch) | |
tree | b5d402b3e80818cde2c079a42249f3dcb9732247 /support/texlab/src/range.rs | |
parent | 58aa1ac09b1d9e4769d0a0661cf12e2b2db41b14 (diff) |
CTAN sync 202105230300
Diffstat (limited to 'support/texlab/src/range.rs')
-rw-r--r-- | support/texlab/src/range.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/support/texlab/src/range.rs b/support/texlab/src/range.rs new file mode 100644 index 0000000000..c70a573f39 --- /dev/null +++ b/support/texlab/src/range.rs @@ -0,0 +1,20 @@ +use lsp_types::{Position, Range}; + +pub trait RangeExt { + fn new_simple(start_line: u32, start_character: u32, end_line: u32, end_character: u32) + -> Self; +} + +impl RangeExt for Range { + fn new_simple( + start_line: u32, + start_character: u32, + end_line: u32, + end_character: u32, + ) -> Self { + Self { + start: Position::new(start_line, start_character), + end: Position::new(end_line, end_character), + } + } +} |