jhpratt / deranged

Proof of concept ranged integers in Rust.
Apache License 2.0
38 stars 5 forks source link

Implement ranged `char` type #6

Closed TonalidadeHidrica closed 2 years ago

TonalidadeHidrica commented 2 years ago

I implemented a ranged char type.

Many functions (like checked_* and saturating_*) and traits (like LowerHex and Octal) are irrational for char, so I had to switch it by introducing additional $is_integral switch. Wondering if this (nested macro with more and more booleans) is the preferred way to do so.

jhpratt commented 2 years ago

I think it's best to keep this crate to ranged integers, as that will be the focus of the RFC I intend on writing.