minor: correct typos

This commit is contained in:
Young-Flash 2024-01-30 21:43:43 +08:00
parent 7219414e81
commit db9fd370ee
23 changed files with 40 additions and 40 deletions

View file

@ -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());
}
}
}

View file

@ -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;