Repository navigation
GeometryBuilder::build_* methods not consuming the builder #253
Unanswered
VictorKoenders
asked this question in
Q&A
Replies: 1 comment
|
The main reason I made them non-consuming is so you can I am interested to see if other people think the naming is confusing though! The current names came about because I originally just had one |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I ran into an oddity just now where I was using 2 geometrybuilders, and I turned them into a mesh with
build_mesh:I noticed that this is valid code. Based on the method name
build_meshI assumed that the builder would be consumed, which would've prevented the small bug I have above.According to the Rust naming guidelines the common keyword for consuming a struct are
.as_,.to_and.into_..build_is not one of those keywords.My question is if it makes sense for other people that
.build_*would consume the builder, or if they think it's fine as-is.(for a backwards compatible change we could introduce a
.finish_meshand a.finish_buffermethod instead)All reactions