-
Notifications
You must be signed in to change notification settings - Fork 42
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
Take &mut self instead of self in builders #22
Comments
Could you please be more specific? Which methods are you referring to? |
I'm referring to most methods in let mut document = Document::new();
if cond {
document.add(…);
} |
I think it’s a good suggestion. I’ve tagged it as “feedback needed” to see if there are other opinions so that we don’t miss anything. If you have time, please feel free to open a pull request. |
I just ran into the same issue. So I'm just here to pile on. I have a wrapper struct that is meant to hold a Example:
|
Let us continue this discussion in #23. I need your input. Thanks! |
@MichaelMauderer, by the way, in your example, would it not work with |
@frozolotl, can’t |
Actually, it does! I had completly missed that function. Thanks for pointing it out. |
I park it for now, as |
See https://rust-lang-nursery.github.io/api-guidelines/type-safety.html#builders-enable-construction-of-complex-values-c-builder
The text was updated successfully, but these errors were encountered: