aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorMatthias Krüger <[email protected]>2020-07-22 21:44:31 +0100
committerMatthias Krüger <[email protected]>2020-07-22 21:44:31 +0100
commit29d3d04227d52c3e81e8c87ab4913b77d29fce28 (patch)
treefbecd17aa54beebb9291c156d110ffbc70d9f68c /crates
parent56ff9ef0262f5bad7fa1d0ac3b76974d88671afd (diff)
assists: change_return_type_to_result: clarify assist description
I had a -> Option<PathBuf> fn, which I wanted to change to Result<PathBuf, _>, but despite advertising to do so, the assist did not change the result type to Result<PathBuf, _> but instead just wrapped it in a Result: <Result<Option<PathBuf>, _>. I changed the assist description to "Wrap return type in Result" to clarify that the assist only wraps the preexisting type and does not do any deep Option-to-Result refactoring.
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_assists/src/handlers/change_return_type_to_result.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/handlers/change_return_type_to_result.rs b/crates/ra_assists/src/handlers/change_return_type_to_result.rs
index 24e5f6963..def00f7d8 100644
--- a/crates/ra_assists/src/handlers/change_return_type_to_result.rs
+++ b/crates/ra_assists/src/handlers/change_return_type_to_result.rs
@@ -36,7 +36,7 @@ pub(crate) fn change_return_type_to_result(acc: &mut Assists, ctx: &AssistContex
36 36
37 acc.add( 37 acc.add(
38 AssistId("change_return_type_to_result", AssistKind::RefactorRewrite), 38 AssistId("change_return_type_to_result", AssistKind::RefactorRewrite),
39 "Change return type to Result", 39 "Wrap return type in Result",
40 type_ref.syntax().text_range(), 40 type_ref.syntax().text_range(),
41 |builder| { 41 |builder| {
42 let mut tail_return_expr_collector = TailReturnCollector::new(); 42 let mut tail_return_expr_collector = TailReturnCollector::new();