@@ -811,7 +811,7 @@ fn main() {
811811
812812[discrete]
813813=== `extract_function`
814- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_function.rs#L38 [extract_function.rs]
814+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_function.rs#L39 [extract_function.rs]
815815
816816Extracts selected statements and comments into new function.
817817
@@ -1724,7 +1724,7 @@ fn bar() {
17241724
17251725[discrete]
17261726=== `inline_local_variable`
1727- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/inline_local_variable.rs#L19 [inline_local_variable.rs]
1727+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/inline_local_variable.rs#L18 [inline_local_variable.rs]
17281728
17291729Inlines a local variable.
17301730
@@ -2668,7 +2668,7 @@ fn compute() -> Option<i32> { None }
26682668
26692669[discrete]
26702670=== `replace_match_with_if_let`
2671- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_if_let_with_match.rs#L185 [replace_if_let_with_match.rs]
2671+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_if_let_with_match.rs#L187 [replace_if_let_with_match.rs]
26722672
26732673Replaces a binary `match` with a wildcard pattern and no guards with an `if let` expression.
26742674
@@ -2698,52 +2698,6 @@ fn handle(action: Action) {
26982698```
26992699
27002700
2701- [discrete]
2702- === `replace_or_else_with_or`
2703- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_or_with_or_else.rs#L89[replace_or_with_or_else.rs]
2704-
2705- Replace `unwrap_or_else` with `unwrap_or` and `ok_or_else` with `ok_or`.
2706-
2707- .Before
2708- ```rust
2709- fn foo() {
2710- let a = Some(1);
2711- a.unwra┃p_or_else(|| 2);
2712- }
2713- ```
2714-
2715- .After
2716- ```rust
2717- fn foo() {
2718- let a = Some(1);
2719- a.unwrap_or(2);
2720- }
2721- ```
2722-
2723-
2724- [discrete]
2725- === `replace_or_with_or_else`
2726- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_or_with_or_else.rs#L12[replace_or_with_or_else.rs]
2727-
2728- Replace `unwrap_or` with `unwrap_or_else` and `ok_or` with `ok_or_else`.
2729-
2730- .Before
2731- ```rust
2732- fn foo() {
2733- let a = Some(1);
2734- a.unwra┃p_or(2);
2735- }
2736- ```
2737-
2738- .After
2739- ```rust
2740- fn foo() {
2741- let a = Some(1);
2742- a.unwrap_or_else(|| 2);
2743- }
2744- ```
2745-
2746-
27472701[discrete]
27482702=== `replace_qualified_name_with_use`
27492703**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_qualified_name_with_use.rs#L13[replace_qualified_name_with_use.rs]
@@ -2831,6 +2785,52 @@ fn main() {
28312785```
28322786
28332787
2788+ [discrete]
2789+ === `replace_with_eager_method`
2790+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_method_eager_lazy.rs#L89[replace_method_eager_lazy.rs]
2791+
2792+ Replace `unwrap_or_else` with `unwrap_or` and `ok_or_else` with `ok_or`.
2793+
2794+ .Before
2795+ ```rust
2796+ fn foo() {
2797+ let a = Some(1);
2798+ a.unwra┃p_or_else(|| 2);
2799+ }
2800+ ```
2801+
2802+ .After
2803+ ```rust
2804+ fn foo() {
2805+ let a = Some(1);
2806+ a.unwrap_or(2);
2807+ }
2808+ ```
2809+
2810+
2811+ [discrete]
2812+ === `replace_with_lazy_method`
2813+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/replace_method_eager_lazy.rs#L9[replace_method_eager_lazy.rs]
2814+
2815+ Replace `unwrap_or` with `unwrap_or_else` and `ok_or` with `ok_or_else`.
2816+
2817+ .Before
2818+ ```rust
2819+ fn foo() {
2820+ let a = Some(1);
2821+ a.unwra┃p_or(2);
2822+ }
2823+ ```
2824+
2825+ .After
2826+ ```rust
2827+ fn foo() {
2828+ let a = Some(1);
2829+ a.unwrap_or_else(|| 2);
2830+ }
2831+ ```
2832+
2833+
28342834[discrete]
28352835=== `sort_items`
28362836**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/sort_items.rs#L12[sort_items.rs]
0 commit comments