Skip to content

Commit

Permalink
fix some typos
Browse files Browse the repository at this point in the history
Signed-off-by: cui fliter <[email protected]>
  • Loading branch information
cuishuang committed May 1, 2023
1 parent 3a27518 commit 41632fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/ide-assists/src/handlers/add_return_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ pub(crate) fn add_return_type(acc: &mut Assists, ctx: &AssistContext<'_>) -> Opt
|builder| {
match builder_edit_pos {
InsertOrReplace::Insert(insert_pos, needs_whitespace) => {
let preceeding_whitespace = if needs_whitespace { " " } else { "" };
builder.insert(insert_pos, format!("{preceeding_whitespace}-> {ty} "))
let preceding_whitespace = if needs_whitespace { " " } else { "" };
builder.insert(insert_pos, format!("{preceding_whitespace}-> {ty} "))
}
InsertOrReplace::Replace(text_range) => {
builder.replace(text_range, format!("-> {ty}"))
Expand Down

0 comments on commit 41632fa

Please sign in to comment.