MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / dequeue

Method dequeue

publication/code/chapter09/find_province_num_bfs.rs:29–35  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

27 }
28
29 fn dequeue(&mut self) -> Option<T> {
30 if self.size() > 0 {
31 self.data.pop()
32 } else {
33 None
34 }
35 }
36
37 fn is_empty(&self) -> bool {
38 0 == self.size()

Callers 1

find_province_num_bfsFunction · 0.45

Calls 2

sizeMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected