Auto merge of #16448 - Young-Flash:typos, r=lnicola

minor: correct typos

I use [crate-ci/typos](https://github.com/crate-ci/typos) to check typos in codebase, if it's ok with you, I'd like to add a typo check CI using [typos](https://github.com/crate-ci/typos) (with Apache-2.0, MIT licenses).

BTW, we can add a [_typos.toml](https://github.com/crate-ci/typos/blob/master/docs/reference.md) as white list for some intentional typos
This commit is contained in:
bors 2024-01-31 13:29:55 +00:00
commit 355c9444e1
23 changed files with 40 additions and 40 deletions

View file

@ -965,10 +965,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
@ -977,7 +977,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;