diff options
author | Aleksey Kladov <[email protected]> | 2018-08-13 12:24:22 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-13 12:24:22 +0100 |
commit | ed2ac1713326df6b926062efcc6109a20cdf7c37 (patch) | |
tree | c1c75d09e2adbbd54190c5b6ce6efdb7ea251da3 /crates/libeditor | |
parent | 18486a02fae5966e61f16ea7bc5c33c6c7c69487 (diff) |
smol_str to a crate
Diffstat (limited to 'crates/libeditor')
-rw-r--r-- | crates/libeditor/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/libeditor/src/lib.rs | 1 | ||||
-rw-r--r-- | crates/libeditor/src/symbols.rs | 3 |
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" | |||
9 | superslice = "0.1.0" | 9 | superslice = "0.1.0" |
10 | 10 | ||
11 | libsyntax2 = { path = "../libsyntax2" } | 11 | libsyntax2 = { path = "../libsyntax2" } |
12 | smol_str = { path = "../smol_str" } | ||
12 | assert_eq_text = { path = "../assert_eq_text" } | 13 | assert_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 @@ | |||
1 | extern crate libsyntax2; | 1 | extern crate libsyntax2; |
2 | extern crate superslice; | 2 | extern crate superslice; |
3 | extern crate itertools; | 3 | extern crate itertools; |
4 | extern crate smol_str; | ||
4 | 5 | ||
5 | mod extend_selection; | 6 | mod extend_selection; |
6 | mod symbols; | 7 | mod 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 @@ | |||
1 | use smol_str::SmolStr; | ||
1 | use libsyntax2::{ | 2 | use 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)] |
12 | pub struct FileSymbol { | 13 | pub 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, |