Remove LocalEdit usage

This commit is contained in:
Wilco Kusee 2019-03-23 16:55:47 +01:00
parent 0c15deac76
commit a656b891fb
3 changed files with 55 additions and 70 deletions

View file

@ -17,13 +17,6 @@ pub use crate::{
structure::{file_structure, StructureNode},
};
#[derive(Debug)]
pub struct LocalEdit {
pub label: String,
pub edit: ra_text_edit::TextEdit,
pub cursor_position: Option<TextUnit>,
}
#[derive(Debug)]
pub struct HighlightedRange {
pub range: TextRange,
@ -36,14 +29,6 @@ pub enum Severity {
WeakWarning,
}
#[derive(Debug)]
pub struct Diagnostic {
pub range: TextRange,
pub msg: String,
pub severity: Severity,
pub fix: Option<LocalEdit>,
}
pub fn matching_brace(file: &SourceFile, offset: TextUnit) -> Option<TextUnit> {
const BRACES: &[SyntaxKind] =
&[L_CURLY, R_CURLY, L_BRACK, R_BRACK, L_PAREN, R_PAREN, L_ANGLE, R_ANGLE];