Skip to content

Commit a3dd6be

Browse files
committed
Reorder add_return_type assist
This assist is often before inline and is very inconvenient Usually, incomplete expression statements are written at the tail of the block, but they are not the return value of the block ```rust fn foo() { Some(2).$0and(optb) } ``` ```text 1. Add this function's return type 2. Inline `and` 3. Qualify `and` method call 4. Replace and with and_then ```
1 parent 0adc11b commit a3dd6be

File tree

1 file changed

+1
-1
lines changed
  • src/tools/rust-analyzer/crates/ide-assists/src

1 file changed

+1
-1
lines changed

src/tools/rust-analyzer/crates/ide-assists/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ mod handlers {
247247
add_label_to_loop::add_label_to_loop,
248248
add_lifetime_to_type::add_lifetime_to_type,
249249
add_missing_match_arms::add_missing_match_arms,
250-
add_return_type::add_return_type,
251250
add_turbo_fish::add_turbo_fish,
252251
apply_demorgan::apply_demorgan_iterator,
253252
apply_demorgan::apply_demorgan,
@@ -392,6 +391,7 @@ mod handlers {
392391
// used as a tie-breaker.
393392
add_missing_impl_members::add_missing_impl_members,
394393
add_missing_impl_members::add_missing_default_members,
394+
add_return_type::add_return_type,
395395
//
396396
replace_string_with_char::replace_string_with_char,
397397
replace_string_with_char::replace_char_with_string,

0 commit comments

Comments
 (0)