boa-dev / temporal

A Rust implementation of ECMAScript's Temporal API
Apache License 2.0
26 stars 4 forks source link

Update duration validation and switch asserts to debug-asserts #73

Closed nekevss closed 4 months ago

nekevss commented 4 months ago

This updates the is_valid_duration check to the current specification and also changes a couple asserts into debug_asserts to prevent panics.

nekevss commented 4 months ago

Yeah, that's not a bad approach. If we added an assert with a log, it might make debugging easier too. I'll add it to this quick.