Ambient icon indicating copy to clipboard operation
Ambient copied to clipboard

feat: Entity::assert_all() (resolves #200)

Open MavethGH opened this issue 2 years ago • 3 comments

This adds a function for asserting that all components of an Entity have a given attribute, panicking if any do not. Suggested by @ten3roberts in #200.

MavethGH avatar Mar 04 '23 20:03 MavethGH

Note that I also ran rustfmt on entity.rs. I don't think that it'll be a problem, but it's worth mentioning since that's why git is saying that some of the imports changed.

MavethGH avatar Mar 04 '23 20:03 MavethGH

Also, I just noticed that the doctest doesn't compile :woman_facepalming:.

MavethGH avatar Mar 04 '23 20:03 MavethGH

Also, I just noticed that the doctest doesn't compile woman_facepalming.

Fixed, after probably too much effort...

MavethGH avatar Mar 04 '23 20:03 MavethGH

Looks fantastic.

Yeah, not sure about the imports as things should already be formatted but some mysteries are best left alone.

ten3roberts avatar Mar 06 '23 08:03 ten3roberts