MCPcopy Create free account
hub / github.com/Lymia/enumset / next

Method next

enumset/src/repr/primitive.rs:284–292  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

282 type Item = u32;
283
284 fn next(&mut self) -> Option<Self::Item> {
285 if self.0.is_empty() {
286 None
287 } else {
288 let bit = self.0.trailing_zeros();
289 self.0.remove_bit(bit);
290 Some(bit)
291 }
292 }
293
294 fn size_hint(&self) -> (usize, Option<usize>) {
295 let left = self.0.count_ones() as usize;

Callers

nothing calls this directly

Calls 2

is_emptyMethod · 0.80
remove_bitMethod · 0.45

Tested by

no test coverage detected