boa-dev / temporal

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

Patch `(un)balance_relative` to avoid panicking #48

Closed jedel1043 closed 5 months ago

jedel1043 commented 5 months ago

A simple patch to avoid panics in Boa, since we'll eventually fix that when the spec is a bit more stable.

jedel1043 commented 5 months ago

Good patch. Definitely need to avoid using expect and use some sort of assertion error :face_with_diagonal_mouth:

Yeah, it would be nice to have the library be panic free.

nekevss commented 5 months ago

Yeah, I was already adding an assertion error into the parser PR. Maybe it would be better off as a separate PR but it should be soon. I'm definitely not super thrilled with using expect on asserts without a good way to test everything.

nekevss commented 5 months ago

Is it worth rebasing and using the new functionality from #50

jedel1043 commented 5 months ago

Yep, gonna do that