dimforge / ncollide

2 and 3-dimensional collision detection library in Rust.
https://ncollide.org
Apache License 2.0
921 stars 105 forks source link

Remove extraneous Clone bound on ShapeHandle::new() #294

Closed distransient closed 5 years ago

distransient commented 5 years ago

Tested locally and doesn't cause problems when cargo test is called.

This would allow ShapeHandle's to be created in cases where the concrete type of the Shape isn't known, allowing the user to pass in their Shapes as trait objects.

distransient commented 5 years ago

I added ShapeHandle::new_from_box and realized it was not needed for my usecase. In fact, I managed to restructure my code so that I didn't need the original change either! These changes might be useful for others though I could cherry pick just the first one if you'd like though.

sebcrozet commented 5 years ago

Thank you for this PR! Could new_from_box be renamed to from_box?

distransient commented 5 years ago

Pushed 👍

sebcrozet commented 5 years ago

Thanks!