Auto merge of #14697 - cuishuang:master, r=lnicola

fix some typos
This commit is contained in:
bors 2023-05-01 07:14:16 +00:00
commit 001607fdb4

View File

@ -34,8 +34,8 @@ pub(crate) fn add_return_type(acc: &mut Assists, ctx: &AssistContext<'_>) -> Opt
|builder| { |builder| {
match builder_edit_pos { match builder_edit_pos {
InsertOrReplace::Insert(insert_pos, needs_whitespace) => { InsertOrReplace::Insert(insert_pos, needs_whitespace) => {
let preceeding_whitespace = if needs_whitespace { " " } else { "" }; let preceding_whitespace = if needs_whitespace { " " } else { "" };
builder.insert(insert_pos, format!("{preceeding_whitespace}-> {ty} ")) builder.insert(insert_pos, format!("{preceding_whitespace}-> {ty} "))
} }
InsertOrReplace::Replace(text_range) => { InsertOrReplace::Replace(text_range) => {
builder.replace(text_range, format!("-> {ty}")) builder.replace(text_range, format!("-> {ty}"))