eraserhd / parinfer-rust

A Rust port of parinfer.
ISC License
546 stars 42 forks source link

Add guard when converting from i64 to usize #76

Closed justinbarclay closed 4 years ago

justinbarclay commented 4 years ago

This is potential fix for https://github.com/eraserhd/parinfer-rust/issues/75

This also includes tests to make sure it returns sensible values and values that should correspond to the parinfer.js implementation of repeatString. Namely that negative numbers are equivalent to 0.

eraserhd commented 4 years ago

Closing this, as I think it is the wrong solution. continuing to discuss in #75