mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-15 23:05:41 +00:00
minor: correct typos
This commit is contained in:
parent
7219414e81
commit
db9fd370ee
23 changed files with 40 additions and 40 deletions
|
@ -960,10 +960,10 @@ impl ast::IdentPat {
|
|||
}
|
||||
|
||||
pub trait HasVisibilityEdit: ast::HasVisibility {
|
||||
fn set_visibility(&self, visbility: ast::Visibility) {
|
||||
fn set_visibility(&self, visibility: ast::Visibility) {
|
||||
match self.visibility() {
|
||||
Some(current_visibility) => {
|
||||
ted::replace(current_visibility.syntax(), visbility.syntax())
|
||||
ted::replace(current_visibility.syntax(), visibility.syntax())
|
||||
}
|
||||
None => {
|
||||
let vis_before = self
|
||||
|
@ -972,7 +972,7 @@ pub trait HasVisibilityEdit: ast::HasVisibility {
|
|||
.find(|it| !matches!(it.kind(), WHITESPACE | COMMENT | ATTR))
|
||||
.unwrap_or_else(|| self.syntax().first_child_or_token().unwrap());
|
||||
|
||||
ted::insert(ted::Position::before(vis_before), visbility.syntax());
|
||||
ted::insert(ted::Position::before(vis_before), visibility.syntax());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -384,7 +384,7 @@ impl ast::UseTreeList {
|
|||
// the below remove the innermost {}, got `use crate::{{{A}}}`
|
||||
remove_brace_in_use_tree_list(&self);
|
||||
|
||||
// the below remove othe unnecessary {}, got `use crate::A`
|
||||
// the below remove other unnecessary {}, got `use crate::A`
|
||||
while let Some(parent_use_tree_list) = self.parent_use_tree().parent_use_tree_list() {
|
||||
remove_brace_in_use_tree_list(&parent_use_tree_list);
|
||||
self = parent_use_tree_list;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue