You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created the methods {first,last}_{one,zero} which report the index of the first or last bit in the bit-slice set to the requested value, returning None on empty bit-slices.
I have also created the methods {leading,trailing}_{ones,zeros}, which report the length of the run of the requested bit at the corresponding end of the bit-slice, returning 0 on empty bit-slices.
Please let me know if these have the behavior you expect.
They will be included in the 0.21 released published before the end of the month.
Using bitvec, I'm building a known bits optimization pass for my compiler. For this I need to know the highest set bit in a bitvec.
This can be implemented using
u64::trailing_zeros()
. Maybe it should be called:{leading|trailing}_{zeros|ones}().
The text was updated successfully, but these errors were encountered: