Skip to content

Commit 29d3d04

Browse files
committed
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.
1 parent 56ff9ef commit 29d3d04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ra_assists/src/handlers/change_return_type_to_result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub(crate) fn change_return_type_to_result(acc: &mut Assists, ctx: &AssistContex
3636

3737
acc.add(
3838
AssistId("change_return_type_to_result", AssistKind::RefactorRewrite),
39-
"Change return type to Result",
39+
"Wrap return type in Result",
4040
type_ref.syntax().text_range(),
4141
|builder| {
4242
let mut tail_return_expr_collector = TailReturnCollector::new();

0 commit comments

Comments
 (0)