diff options
author | Chetan Khilosiya <[email protected]> | 2021-02-22 19:14:58 +0000 |
---|---|---|
committer | Chetan Khilosiya <[email protected]> | 2021-02-22 19:29:16 +0000 |
commit | eb6cfa7f157690480fca5d55c69dba3fae87ad4f (patch) | |
tree | a49a763fee848041fd607f449ad13a0b1040636e /crates/ide | |
parent | e4756cb4f6e66097638b9d101589358976be2ba8 (diff) |
7526: Renamed create ssr to ide_ssr.
Diffstat (limited to 'crates/ide')
-rw-r--r-- | crates/ide/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ide/src/lib.rs | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/crates/ide/Cargo.toml b/crates/ide/Cargo.toml index b7152c839..f6aaaeda4 100644 --- a/crates/ide/Cargo.toml +++ b/crates/ide/Cargo.toml | |||
@@ -28,7 +28,7 @@ cfg = { path = "../cfg", version = "0.0.0" } | |||
28 | profile = { path = "../profile", version = "0.0.0" } | 28 | profile = { path = "../profile", version = "0.0.0" } |
29 | test_utils = { path = "../test_utils", version = "0.0.0" } | 29 | test_utils = { path = "../test_utils", version = "0.0.0" } |
30 | ide_assists = { path = "../ide_assists", version = "0.0.0" } | 30 | ide_assists = { path = "../ide_assists", version = "0.0.0" } |
31 | ssr = { path = "../ssr", version = "0.0.0" } | 31 | ide_ssr = { path = "../ide_ssr", version = "0.0.0" } |
32 | ide_completion = { path = "../ide_completion", version = "0.0.0" } | 32 | ide_completion = { path = "../ide_completion", version = "0.0.0" } |
33 | 33 | ||
34 | # ide should depend only on the top-level `hir` package. if you need | 34 | # ide should depend only on the top-level `hir` package. if you need |
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index eb26d13b9..b600178ee 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs | |||
@@ -101,7 +101,7 @@ pub use ide_db::{ | |||
101 | symbol_index::Query, | 101 | symbol_index::Query, |
102 | RootDatabase, | 102 | RootDatabase, |
103 | }; | 103 | }; |
104 | pub use ssr::SsrError; | 104 | pub use ide_ssr::SsrError; |
105 | pub use syntax::{TextRange, TextSize}; | 105 | pub use syntax::{TextRange, TextSize}; |
106 | pub use text_edit::{Indel, TextEdit}; | 106 | pub use text_edit::{Indel, TextEdit}; |
107 | 107 | ||
@@ -549,8 +549,9 @@ impl Analysis { | |||
549 | selections: Vec<FileRange>, | 549 | selections: Vec<FileRange>, |
550 | ) -> Cancelable<Result<SourceChange, SsrError>> { | 550 | ) -> Cancelable<Result<SourceChange, SsrError>> { |
551 | self.with_db(|db| { | 551 | self.with_db(|db| { |
552 | let rule: ssr::SsrRule = query.parse()?; | 552 | let rule: ide_ssr::SsrRule = query.parse()?; |
553 | let mut match_finder = ssr::MatchFinder::in_context(db, resolve_context, selections); | 553 | let mut match_finder = |
554 | ide_ssr::MatchFinder::in_context(db, resolve_context, selections); | ||
554 | match_finder.add_rule(rule)?; | 555 | match_finder.add_rule(rule)?; |
555 | let edits = if parse_only { Default::default() } else { match_finder.edits() }; | 556 | let edits = if parse_only { Default::default() } else { match_finder.edits() }; |
556 | Ok(SourceChange::from(edits)) | 557 | Ok(SourceChange::from(edits)) |