Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tasks/ast_tools/src/generators/ast_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl Generator for AstKindGenerator {
.into_iter()
.filter(|def| {
let is_visitable = def.visitable();
let is_blacklisted = BLACK_LIST.contains(&def.name().as_str());
let is_blacklisted = BLACK_LIST.contains(&def.name());
is_visitable && !is_blacklisted
})
.map(|def| {
Expand Down
4 changes: 2 additions & 2 deletions tasks/ast_tools/src/generators/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::{
markers::VisitArg,
output,
schema::{EnumDef, GetIdent, StructDef, ToType, TypeDef},
util::{StrExt, ToIdent, TokenStreamExt, TypeWrapper},
util::{StrExt, TokenStreamExt, TypeWrapper},
Generator, GeneratorOutput,
};

Expand Down Expand Up @@ -187,7 +187,7 @@ impl<'a> VisitBuilder<'a> {
let (ident, as_type) = {
debug_assert!(def.visitable(), "{def:?}");

let ident = def.name().to_ident();
let ident = def.ident();
let as_type = def.to_type();

(ident, if collection { parse_quote!(Vec<'a, #as_type>) } else { as_type })
Expand Down
2 changes: 1 addition & 1 deletion tasks/ast_tools/src/schema/defs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl TypeDef {
with_either!(self, it => it.id)
}

pub fn name(&self) -> &String {
pub fn name(&self) -> &str {
with_either!(self, it => &it.name)
}

Expand Down