mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
refactor(ast): AstKind::as_* methods take self (#5546)
Make `AstKind::as_*` methods (e.g. `AstKind::as_boolean_literal`) take `self`, not `&self`. `AstKind` is `Copy`. See: https://github.com/oxc-project/oxc/issues/5506#issuecomment-2332912976
This commit is contained in:
parent
5cfdc05d06
commit
d27e14f065
2 changed files with 332 additions and 332 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -114,9 +114,9 @@ impl Generator for AstKindGenerator {
|
|||
parse_quote!(
|
||||
///@@line_break
|
||||
#[inline]
|
||||
pub fn #snake_case_name(&self) -> Option<&'a #typ> {
|
||||
pub fn #snake_case_name(self) -> Option<&'a #typ> {
|
||||
if let Self::#ident(v) = self {
|
||||
Some(*v)
|
||||
Some(v)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue