cloudflare / saffron

The cron parser powering Cron Triggers on Cloudflare Workers
BSD 3-Clause "New" or "Revised" License
238 stars 16 forks source link

Add support for normalizing OrsExpr values #6

Closed ObsidianMinor closed 3 years ago

ObsidianMinor commented 3 years ago

Change OrsExpr::Step.end to E instead of Option Add constructors for min and max ExprValues Use normalize in compilation to avoid equality checks Use named constants when iterating over wrapping step ranges

A small breaking change before we release, makes OrsStep::Step.end an E instead of an Option<E>, which saves a byte and gives us better alignment (4 instead of 5 bytes)