diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_assists/src/assists/auto_import.rs | 16 | ||||
-rw-r--r-- | crates/ra_cargo_watch/src/lib.rs | 1 | ||||
-rw-r--r-- | crates/ra_cli/src/analysis_stats.rs | 4 |
3 files changed, 13 insertions, 8 deletions
diff --git a/crates/ra_assists/src/assists/auto_import.rs b/crates/ra_assists/src/assists/auto_import.rs index 69126a1c9..932a52bff 100644 --- a/crates/ra_assists/src/assists/auto_import.rs +++ b/crates/ra_assists/src/assists/auto_import.rs | |||
@@ -64,12 +64,16 @@ pub(crate) fn auto_import<F: ImportsLocator>( | |||
64 | return None; | 64 | return None; |
65 | } | 65 | } |
66 | 66 | ||
67 | ctx.add_assist_group(AssistId("auto_import"), "auto import", || { | 67 | ctx.add_assist_group( |
68 | proposed_imports | 68 | AssistId("auto_import"), |
69 | .into_iter() | 69 | format!("Import {}", path_to_import_syntax), |
70 | .map(|import| import_to_action(import, &position, &path_to_import_syntax)) | 70 | || { |
71 | .collect() | 71 | proposed_imports |
72 | }) | 72 | .into_iter() |
73 | .map(|import| import_to_action(import, &position, &path_to_import_syntax)) | ||
74 | .collect() | ||
75 | }, | ||
76 | ) | ||
73 | } | 77 | } |
74 | 78 | ||
75 | fn import_to_action(import: String, position: &SyntaxNode, anchor: &SyntaxNode) -> ActionBuilder { | 79 | fn import_to_action(import: String, position: &SyntaxNode, anchor: &SyntaxNode) -> ActionBuilder { |
diff --git a/crates/ra_cargo_watch/src/lib.rs b/crates/ra_cargo_watch/src/lib.rs index ea7ddc86b..a718a5e52 100644 --- a/crates/ra_cargo_watch/src/lib.rs +++ b/crates/ra_cargo_watch/src/lib.rs | |||
@@ -343,6 +343,7 @@ impl WatchThread { | |||
343 | .args(&args) | 343 | .args(&args) |
344 | .stdout(Stdio::piped()) | 344 | .stdout(Stdio::piped()) |
345 | .stderr(Stdio::null()) | 345 | .stderr(Stdio::null()) |
346 | .stdin(Stdio::null()) | ||
346 | .spawn() | 347 | .spawn() |
347 | .expect("couldn't launch cargo"); | 348 | .expect("couldn't launch cargo"); |
348 | 349 | ||
diff --git a/crates/ra_cli/src/analysis_stats.rs b/crates/ra_cli/src/analysis_stats.rs index fd0027691..833235bff 100644 --- a/crates/ra_cli/src/analysis_stats.rs +++ b/crates/ra_cli/src/analysis_stats.rs | |||
@@ -171,12 +171,12 @@ pub fn run( | |||
171 | println!( | 171 | println!( |
172 | "Expressions of unknown type: {} ({}%)", | 172 | "Expressions of unknown type: {} ({}%)", |
173 | num_exprs_unknown, | 173 | num_exprs_unknown, |
174 | if num_exprs > 0 { (num_exprs_unknown * 100 / num_exprs) } else { 100 } | 174 | if num_exprs > 0 { num_exprs_unknown * 100 / num_exprs } else { 100 } |
175 | ); | 175 | ); |
176 | println!( | 176 | println!( |
177 | "Expressions of partially unknown type: {} ({}%)", | 177 | "Expressions of partially unknown type: {} ({}%)", |
178 | num_exprs_partially_unknown, | 178 | num_exprs_partially_unknown, |
179 | if num_exprs > 0 { (num_exprs_partially_unknown * 100 / num_exprs) } else { 100 } | 179 | if num_exprs > 0 { num_exprs_partially_unknown * 100 / num_exprs } else { 100 } |
180 | ); | 180 | ); |
181 | println!("Type mismatches: {}", num_type_mismatches); | 181 | println!("Type mismatches: {}", num_type_mismatches); |
182 | println!("Inference: {:?}, {}", inference_time.elapsed(), ra_prof::memory_usage()); | 182 | println!("Inference: {:?}, {}", inference_time.elapsed(), ra_prof::memory_usage()); |