-
Notifications
You must be signed in to change notification settings - Fork 121
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
Added FmtConst impl for String and Vec<Primitive> #185
base: master
Are you sure you want to change the base?
Conversation
This allows the user to user owned types for dynamic code generation.
yes please. just ran into this while attempting to update. |
I ran into the lack of delegate_debug!(String); |
@@ -111,6 +111,19 @@ delegate_debug!(u128); | |||
delegate_debug!(i128); | |||
delegate_debug!(bool); | |||
|
|||
delegate_debug!(String); |
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.
For consistency I would probably move this one up above under the delegate_debug!(str);
line then have this next grouping be for Vec<>()
. Would it make sense to have Vec<String>
as well?
delegate_debug!(Vec<i64>); | ||
delegate_debug!(Vec<u128>); | ||
delegate_debug!(Vec<i128>); | ||
delegate_debug!(Vec<bool>); |
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.
delegate_debug!()
is not correct for Vec<_>
because it prints an array literal.
I've merged the support for |
This allows the user to user owned types for dynamic code generation.
Here is a example where this is required:
Previously the user would have to leak the String to get a &'static str.
I also ran rustfmt, which explains some of the diff.