diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_assists/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_cargo_watch/Cargo.toml | 3 | ||||
-rw-r--r-- | crates/ra_hir/src/semantics.rs | 13 | ||||
-rw-r--r-- | crates/ra_hir_def/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_ide/Cargo.toml | 3 | ||||
-rw-r--r-- | crates/ra_ide/src/extend_selection.rs | 8 | ||||
-rw-r--r-- | crates/ra_ide_db/Cargo.toml | 12 | ||||
-rw-r--r-- | crates/ra_prof/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_text_edit/Cargo.toml | 4 | ||||
-rw-r--r-- | crates/rust-analyzer/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/test_utils/Cargo.toml | 2 |
11 files changed, 6 insertions, 43 deletions
diff --git a/crates/ra_assists/Cargo.toml b/crates/ra_assists/Cargo.toml index 12a933645..d314dc8e6 100644 --- a/crates/ra_assists/Cargo.toml +++ b/crates/ra_assists/Cargo.toml | |||
@@ -11,7 +11,6 @@ doctest = false | |||
11 | format-buf = "1.0.0" | 11 | format-buf = "1.0.0" |
12 | join_to_string = "0.1.3" | 12 | join_to_string = "0.1.3" |
13 | rustc-hash = "1.1.0" | 13 | rustc-hash = "1.1.0" |
14 | either = "1.5.3" | ||
15 | 14 | ||
16 | ra_syntax = { path = "../ra_syntax" } | 15 | ra_syntax = { path = "../ra_syntax" } |
17 | ra_text_edit = { path = "../ra_text_edit" } | 16 | ra_text_edit = { path = "../ra_text_edit" } |
diff --git a/crates/ra_cargo_watch/Cargo.toml b/crates/ra_cargo_watch/Cargo.toml index 989ccc097..1fdbffea1 100644 --- a/crates/ra_cargo_watch/Cargo.toml +++ b/crates/ra_cargo_watch/Cargo.toml | |||
@@ -9,10 +9,7 @@ crossbeam-channel = "0.4.0" | |||
9 | lsp-types = { version = "0.71.0", features = ["proposed"] } | 9 | lsp-types = { version = "0.71.0", features = ["proposed"] } |
10 | log = "0.4.8" | 10 | log = "0.4.8" |
11 | cargo_metadata = "0.9.1" | 11 | cargo_metadata = "0.9.1" |
12 | jod-thread = "0.1.0" | ||
13 | parking_lot = "0.10.0" | ||
14 | serde_json = "1.0.48" | 12 | serde_json = "1.0.48" |
15 | 13 | ||
16 | [dev-dependencies] | 14 | [dev-dependencies] |
17 | insta = "0.13.1" | 15 | insta = "0.13.1" |
18 | serde_json = "1.0.48" | ||
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 5b0b94e34..c3d8ee1ae 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs | |||
@@ -388,7 +388,7 @@ fn original_range_and_origin( | |||
388 | let single = skip_trivia_token(node.value.first_token()?, Direction::Next)? | 388 | let single = skip_trivia_token(node.value.first_token()?, Direction::Next)? |
389 | == skip_trivia_token(node.value.last_token()?, Direction::Prev)?; | 389 | == skip_trivia_token(node.value.last_token()?, Direction::Prev)?; |
390 | 390 | ||
391 | return Some(node.value.descendants().find_map(|it| { | 391 | Some(node.value.descendants().find_map(|it| { |
392 | let first = skip_trivia_token(it.first_token()?, Direction::Next)?; | 392 | let first = skip_trivia_token(it.first_token()?, Direction::Next)?; |
393 | let last = skip_trivia_token(it.last_token()?, Direction::Prev)?; | 393 | let last = skip_trivia_token(it.last_token()?, Direction::Prev)?; |
394 | 394 | ||
@@ -404,16 +404,9 @@ fn original_range_and_origin( | |||
404 | return None; | 404 | return None; |
405 | } | 405 | } |
406 | 406 | ||
407 | // FIXME: Add union method in TextRange | ||
408 | Some(( | 407 | Some(( |
409 | first.with_value(union_range(first.value.text_range(), last.value.text_range())), | 408 | first.with_value(first.value.text_range().extend_to(&last.value.text_range())), |
410 | first_origin, | 409 | first_origin, |
411 | )) | 410 | )) |
412 | })?); | 411 | })?) |
413 | |||
414 | fn union_range(a: TextRange, b: TextRange) -> TextRange { | ||
415 | let start = a.start().min(b.start()); | ||
416 | let end = a.end().max(b.end()); | ||
417 | TextRange::from_to(start, end) | ||
418 | } | ||
419 | } | 412 | } |
diff --git a/crates/ra_hir_def/Cargo.toml b/crates/ra_hir_def/Cargo.toml index 5053d0688..fa25cc4fb 100644 --- a/crates/ra_hir_def/Cargo.toml +++ b/crates/ra_hir_def/Cargo.toml | |||
@@ -14,7 +14,6 @@ rustc-hash = "1.1.0" | |||
14 | either = "1.5.3" | 14 | either = "1.5.3" |
15 | anymap = "0.12.1" | 15 | anymap = "0.12.1" |
16 | drop_bomb = "0.1.4" | 16 | drop_bomb = "0.1.4" |
17 | itertools = "0.8.2" | ||
18 | 17 | ||
19 | ra_arena = { path = "../ra_arena" } | 18 | ra_arena = { path = "../ra_arena" } |
20 | ra_db = { path = "../ra_db" } | 19 | ra_db = { path = "../ra_db" } |
diff --git a/crates/ra_ide/Cargo.toml b/crates/ra_ide/Cargo.toml index 6a3112f9c..7625fc8c8 100644 --- a/crates/ra_ide/Cargo.toml +++ b/crates/ra_ide/Cargo.toml | |||
@@ -17,10 +17,7 @@ indexmap = "1.3.2" | |||
17 | itertools = "0.8.2" | 17 | itertools = "0.8.2" |
18 | join_to_string = "0.1.3" | 18 | join_to_string = "0.1.3" |
19 | log = "0.4.8" | 19 | log = "0.4.8" |
20 | rayon = "1.3.0" | ||
21 | fst = { version = "0.3.5", default-features = false } | ||
22 | rustc-hash = "1.1.0" | 20 | rustc-hash = "1.1.0" |
23 | superslice = "1.0.0" | ||
24 | rand = { version = "0.7.3", features = ["small_rng"] } | 21 | rand = { version = "0.7.3", features = ["small_rng"] } |
25 | once_cell = "1.3.1" | 22 | once_cell = "1.3.1" |
26 | 23 | ||
diff --git a/crates/ra_ide/src/extend_selection.rs b/crates/ra_ide/src/extend_selection.rs index 2e09bd1ec..f5a063351 100644 --- a/crates/ra_ide/src/extend_selection.rs +++ b/crates/ra_ide/src/extend_selection.rs | |||
@@ -161,7 +161,7 @@ fn extend_tokens_from_range( | |||
161 | .take_while(validate) | 161 | .take_while(validate) |
162 | .last()?; | 162 | .last()?; |
163 | 163 | ||
164 | let range = union_range(first.text_range(), last.text_range()); | 164 | let range = first.text_range().extend_to(&last.text_range()); |
165 | if original_range.is_subrange(&range) && original_range != range { | 165 | if original_range.is_subrange(&range) && original_range != range { |
166 | Some(range) | 166 | Some(range) |
167 | } else { | 167 | } else { |
@@ -169,12 +169,6 @@ fn extend_tokens_from_range( | |||
169 | } | 169 | } |
170 | } | 170 | } |
171 | 171 | ||
172 | fn union_range(range: TextRange, r: TextRange) -> TextRange { | ||
173 | let start = range.start().min(r.start()); | ||
174 | let end = range.end().max(r.end()); | ||
175 | TextRange::from_to(start, end) | ||
176 | } | ||
177 | |||
178 | /// Find the shallowest node with same range, which allows us to traverse siblings. | 172 | /// Find the shallowest node with same range, which allows us to traverse siblings. |
179 | fn shallowest_node(node: &SyntaxNode) -> SyntaxNode { | 173 | fn shallowest_node(node: &SyntaxNode) -> SyntaxNode { |
180 | node.ancestors().take_while(|n| n.text_range() == node.text_range()).last().unwrap() | 174 | node.ancestors().take_while(|n| n.text_range() == node.text_range()).last().unwrap() |
diff --git a/crates/ra_ide_db/Cargo.toml b/crates/ra_ide_db/Cargo.toml index 2f5b74b92..7b285d280 100644 --- a/crates/ra_ide_db/Cargo.toml +++ b/crates/ra_ide_db/Cargo.toml | |||
@@ -11,29 +11,17 @@ doctest = false | |||
11 | wasm = [] | 11 | wasm = [] |
12 | 12 | ||
13 | [dependencies] | 13 | [dependencies] |
14 | either = "1.5.3" | ||
15 | format-buf = "1.0.0" | ||
16 | indexmap = "1.3.2" | ||
17 | itertools = "0.8.2" | ||
18 | join_to_string = "0.1.3" | ||
19 | log = "0.4.8" | 14 | log = "0.4.8" |
20 | rayon = "1.3.0" | 15 | rayon = "1.3.0" |
21 | fst = { version = "0.3.5", default-features = false } | 16 | fst = { version = "0.3.5", default-features = false } |
22 | rustc-hash = "1.1.0" | 17 | rustc-hash = "1.1.0" |
23 | superslice = "1.0.0" | 18 | superslice = "1.0.0" |
24 | once_cell = "1.3.1" | ||
25 | 19 | ||
26 | ra_syntax = { path = "../ra_syntax" } | 20 | ra_syntax = { path = "../ra_syntax" } |
27 | ra_text_edit = { path = "../ra_text_edit" } | 21 | ra_text_edit = { path = "../ra_text_edit" } |
28 | ra_db = { path = "../ra_db" } | 22 | ra_db = { path = "../ra_db" } |
29 | ra_cfg = { path = "../ra_cfg" } | ||
30 | ra_fmt = { path = "../ra_fmt" } | ||
31 | ra_prof = { path = "../ra_prof" } | 23 | ra_prof = { path = "../ra_prof" } |
32 | test_utils = { path = "../test_utils" } | ||
33 | 24 | ||
34 | # ra_ide should depend only on the top-level `hir` package. if you need | 25 | # ra_ide should depend only on the top-level `hir` package. if you need |
35 | # something from some `hir_xxx` subpackage, reexport the API via `hir`. | 26 | # something from some `hir_xxx` subpackage, reexport the API via `hir`. |
36 | hir = { path = "../ra_hir", package = "ra_hir" } | 27 | hir = { path = "../ra_hir", package = "ra_hir" } |
37 | |||
38 | [dev-dependencies] | ||
39 | insta = "0.13.1" | ||
diff --git a/crates/ra_prof/Cargo.toml b/crates/ra_prof/Cargo.toml index 823745795..d15b08992 100644 --- a/crates/ra_prof/Cargo.toml +++ b/crates/ra_prof/Cargo.toml | |||
@@ -10,7 +10,6 @@ doctest = false | |||
10 | 10 | ||
11 | [dependencies] | 11 | [dependencies] |
12 | once_cell = "1.3.1" | 12 | once_cell = "1.3.1" |
13 | itertools = "0.8.2" | ||
14 | backtrace = { version = "0.3.44", optional = true } | 13 | backtrace = { version = "0.3.44", optional = true } |
15 | 14 | ||
16 | [target.'cfg(not(target_env = "msvc"))'.dependencies] | 15 | [target.'cfg(not(target_env = "msvc"))'.dependencies] |
diff --git a/crates/ra_text_edit/Cargo.toml b/crates/ra_text_edit/Cargo.toml index a32149299..cae28389d 100644 --- a/crates/ra_text_edit/Cargo.toml +++ b/crates/ra_text_edit/Cargo.toml | |||
@@ -9,7 +9,5 @@ publish = false | |||
9 | doctest = false | 9 | doctest = false |
10 | 10 | ||
11 | [dependencies] | 11 | [dependencies] |
12 | text_unit = "0.1.9" | 12 | text_unit = "0.1.10" |
13 | 13 | ||
14 | [dev-dependencies] | ||
15 | test_utils = { path = "../test_utils" } | ||
diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml index 2cd39b7be..d00545121 100644 --- a/crates/rust-analyzer/Cargo.toml +++ b/crates/rust-analyzer/Cargo.toml | |||
@@ -15,7 +15,6 @@ path = "./src/bin/main.rs" | |||
15 | [dependencies] | 15 | [dependencies] |
16 | anyhow = "1.0.26" | 16 | anyhow = "1.0.26" |
17 | crossbeam-channel = "0.4.0" | 17 | crossbeam-channel = "0.4.0" |
18 | either = "1.5.3" | ||
19 | env_logger = { version = "0.7.1", default-features = false } | 18 | env_logger = { version = "0.7.1", default-features = false } |
20 | globset = "0.4.4" | 19 | globset = "0.4.4" |
21 | itertools = "0.8.2" | 20 | itertools = "0.8.2" |
diff --git a/crates/test_utils/Cargo.toml b/crates/test_utils/Cargo.toml index 971592b73..6a7c6d6f9 100644 --- a/crates/test_utils/Cargo.toml +++ b/crates/test_utils/Cargo.toml | |||
@@ -9,5 +9,5 @@ doctest = false | |||
9 | 9 | ||
10 | [dependencies] | 10 | [dependencies] |
11 | difference = "2.0.0" | 11 | difference = "2.0.0" |
12 | text_unit = "0.1.9" | 12 | text_unit = "0.1.10" |
13 | serde_json = "1.0.48" | 13 | serde_json = "1.0.48" |