zvxryb / broadphase-rs

A broadphase collision detection library, in Rust
MIT License
12 stars 1 forks source link

Remove Default from ObjectID #14

Closed SpecificProtagonist closed 4 years ago

SpecificProtagonist commented 4 years ago

Implementing ObjectID requires Default. However, a default entity usually doesn't make any sense. specs::Entity or hecs::Entity, for example, don't implement Default for this reason and therefore can't be used. Luckily, it seems like this requirement can simply be removed.

Is there any reason for this that I've missed?

zvxryb commented 4 years ago

Thanks for pointing this out.

Is there any reason for this that I've missed?

Not that I can see. In fact, it doesn't appear to be required in the commit where it was introduced, so I guess I must've added it for some reason but found a cleaner way to do things and forgot to remove the requirement from the trait.

In any case, looks good, merged.