aboutsummaryrefslogtreecommitdiff
path: root/crates/libeditor
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libeditor')
-rw-r--r--crates/libeditor/Cargo.toml1
-rw-r--r--crates/libeditor/src/lib.rs1
-rw-r--r--crates/libeditor/src/symbols.rs3
3 files changed, 4 insertions, 1 deletions
diff --git a/crates/libeditor/Cargo.toml b/crates/libeditor/Cargo.toml
index fe688bc20..1d210f3c1 100644
--- a/crates/libeditor/Cargo.toml
+++ b/crates/libeditor/Cargo.toml
@@ -9,4 +9,5 @@ itertools = "0.7.8"
9superslice = "0.1.0" 9superslice = "0.1.0"
10 10
11libsyntax2 = { path = "../libsyntax2" } 11libsyntax2 = { path = "../libsyntax2" }
12smol_str = { path = "../smol_str" }
12assert_eq_text = { path = "../assert_eq_text" } 13assert_eq_text = { path = "../assert_eq_text" }
diff --git a/crates/libeditor/src/lib.rs b/crates/libeditor/src/lib.rs
index 1e88f1471..e5933cbd6 100644
--- a/crates/libeditor/src/lib.rs
+++ b/crates/libeditor/src/lib.rs
@@ -1,6 +1,7 @@
1extern crate libsyntax2; 1extern crate libsyntax2;
2extern crate superslice; 2extern crate superslice;
3extern crate itertools; 3extern crate itertools;
4extern crate smol_str;
4 5
5mod extend_selection; 6mod extend_selection;
6mod symbols; 7mod symbols;
diff --git a/crates/libeditor/src/symbols.rs b/crates/libeditor/src/symbols.rs
index 5cd781c80..03f2313f7 100644
--- a/crates/libeditor/src/symbols.rs
+++ b/crates/libeditor/src/symbols.rs
@@ -1,3 +1,4 @@
1use smol_str::SmolStr;
1use libsyntax2::{ 2use libsyntax2::{
2 SyntaxKind, SyntaxNodeRef, SyntaxRoot, AstNode, 3 SyntaxKind, SyntaxNodeRef, SyntaxRoot, AstNode,
3 ast::{self, NameOwner}, 4 ast::{self, NameOwner},
@@ -11,7 +12,7 @@ use TextRange;
11#[derive(Debug)] 12#[derive(Debug)]
12pub struct FileSymbol { 13pub struct FileSymbol {
13 pub parent: Option<usize>, 14 pub parent: Option<usize>,
14 pub name: String, 15 pub name: SmolStr,
15 pub name_range: TextRange, 16 pub name_range: TextRange,
16 pub node_range: TextRange, 17 pub node_range: TextRange,
17 pub kind: SyntaxKind, 18 pub kind: SyntaxKind,