From 30f33d16a8235d8a541fc760001ecbe14fcb90aa Mon Sep 17 00:00:00 2001 From: Veetaha Date: Fri, 2 Oct 2026 21:40:55 +0000 Subject: [PATCH] chore: attribute the old macro bottleneck to the syn parse --- bon-macros/src/builder/builder_gen/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bon-macros/src/builder/builder_gen/mod.rs b/bon-macros/src/builder/builder_gen/mod.rs index 59e8f5b1..5cf9387e 100644 --- a/bon-macros/src/builder/builder_gen/mod.rs +++ b/bon-macros/src/builder/builder_gen/mod.rs @@ -72,9 +72,9 @@ impl BuilderGenCtx { .collect::>(); // Every item here is a single top-level item. We add the `allow` - // attributes to each of them directly. Previously this code converted - // the final token stream to string and parsed it to `syn::File`, which - // resulted in a significant performance hit. Ouch. Don't do that again! + // attributes to each of them directly. Previously this code parsed + // the final token stream into a `syn::File`, which resulted in a + // significant performance hit. Ouch. Don't do that again! let other_items = [builder_decl, builder_impl] .into_iter() .chain(builder_derives)