fix compile error in EditorLspTestContext

This commit is contained in:
Keith Simmons 2022-06-09 16:36:02 -07:00
parent 8378590d57
commit 3cec157335

View file

@ -467,7 +467,7 @@ impl<'a> EditorLspTestContext<'a> {
// Constructs lsp range using a marked string with '[', ']' range delimiters
pub fn lsp_range(&mut self, marked_text: &str) -> lsp::Range {
let (unmarked, mut ranges) = marked_text_ranges_by(marked_text, vec![('[', ']').into()]);
assert_eq!(unmarked, self.editor_text());
assert_eq!(unmarked, self.cx.editor_text());
let snapshot = self.update_editor(|editor, cx| editor.snapshot(cx));
let offset_range = ranges.remove(&('[', ']').into()).unwrap()[0].clone();