Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/diagnostic.rs')
| -rw-r--r-- | helix-core/src/diagnostic.rs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/helix-core/src/diagnostic.rs b/helix-core/src/diagnostic.rs index 4e89361d..333c9409 100644 --- a/helix-core/src/diagnostic.rs +++ b/helix-core/src/diagnostic.rs @@ -1,6 +1,7 @@ //! LSP diagnostic utility types. use std::fmt; +pub use helix_stdx::range::Range; use serde::{Deserialize, Serialize}; /// Describes the severity level of a [`Diagnostic`]. @@ -19,19 +20,6 @@ impl Default for Severity { } } -/// A range of `char`s within the text. -#[derive(Debug, Clone, Copy, PartialOrd, Ord, PartialEq, Eq)] -pub struct Range { - pub start: usize, - pub end: usize, -} - -impl Range { - pub fn contains(self, pos: usize) -> bool { - (self.start..self.end).contains(&pos) - } -} - #[derive(Debug, Eq, Hash, PartialEq, Clone, Deserialize, Serialize)] pub enum NumberOrString { Number(i32), |