anp / rusl

An experimental (read: DONT USE) musl libc implementation in Rust.
Other
292 stars 12 forks source link

Add rust implementation of `strspn` #7

Closed andrey-gvrd closed 8 years ago

andrey-gvrd commented 8 years ago

Naive rewrite of C code into Rust. Might want to rewrite in Rust from scratch in the future.

Not sure about the bit array code, should probably be moved out.

anp commented 8 years ago

Thanks for the PR!

Looks like this needs to have rustfmt run to pass CI (it's set up to use 0.5).

Due to Rust's current lack of integer generics, I think it makes sense to leave the BitArray in this module unless there's a specific need for an ASCII-size bit array elsewhere. Perhaps even rename it to AsciiBitArray or something similar?

anp commented 8 years ago

Thanks again!