danielpclark / rutie

“The Tie Between Ruby and Rust.”
MIT License
939 stars 62 forks source link

feat: Implement `Integer::to_u32` and `Fixnum::to_u32` #147

Closed Hywan closed 2 years ago

Hywan commented 3 years ago

Hello,

This PR adds the Integer::to_u32 and Fixnum::to_u32 methods. I'm not sure what to do when we try to convert -1 (Ruby) to u32 (Rust). For the moment, it overflows to std::u32::MAX. What's the best practise in rutie?

danielpclark commented 2 years ago

This is now in master and released in v0.8.3