-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Every used template gets referenced exactly once #87
Conversation
[dev-dependencies] | ||
console = "0.15.8" | ||
similar = "2.6.0" | ||
prettyplease = "0.2.20" | ||
syn = { version = "2.0.3", features = ["extra-traits", "full"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to tell me if you think this is overkill. I thought "lets make it pretty", but maybe I overdid it a bit :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's dev dependencies, so I definitely don't care. :)
5e2d1e1
to
b4ae883
Compare
I think it's definitely not worth it for "by template" approach. I also wondered about it myself but it really only makes sense for multiple templates. But as you underlined, the only solution for that would be |
b4ae883
to
2908e8c
Compare
2908e8c
to
ce059b1
Compare
Once per `#[template]`, that is. Still multiple times per crate.
ce059b1
to
55774ff
Compare
I think this diff might still make it worthwhile. Doesn't it? |
writer.write_str("3")?; | ||
writer.write_str("3")?; | ||
writer.write_str("3")?; | ||
writer.write_str("3")?;"# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be joined into one call with 3c08d0b.
Can you just provide a bench comparison in addition to the improved output please? |
|
What I was interested about was whether or not we had a perf regression. Since it's not the case, all good, thanks! |
Once per
#[template]
, that is. Still multiple times per crate.Do you think that is enough to resolve #72, @GuillaumeGomez?