Skip to content

v0.22.0

  • v0.22.0
  • 2894075
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
  • Choose a tag to compare

  • v0.22.0
  • 2894075
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@bors-servo bors-servo tagged this 29 Jul 21:02
(breaking change) Make intersection return Option<Self>

Replaces #462

As I go through the webrender update I realize that returning `Option<NonEmpty<Self>>` adds way more friction than I anticipated. Pretty much all call sites have to be worked around in different ways. #462 helps for at least a good half of the call sites, but there are many other patterns, and I am not running into cases where NonEmpty is adding value, because we end up having to deal with storing something when the intersection is empty (the way webrender's code is shaped).

I'm very woriied that `intersection` is just going to be a pain to use by default, with NonEmpty providing more friction than value, so considering 0.21 is just out, I would rather make a early 0.22 now before a significant part of downstream users have had time to update to 0.21, and get rid of the thorn before we are stuck with it.

Note that for cases where `Option<NonEmpty<Box2D>>` would have been desirable, we can still write `b.intersection_unchecked(b2).to_non_empty(), which is not too inconvenient even if not the default.
Assets 2
Loading