Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QMHTMY/RustBook
/ dequeue
Method
dequeue
publication/code/chapter04/hot_potato.rs:26–32 ·
view source on GitHub ↗
(&mut self)
Source
from the content-addressed store, hash-verified
24
}
25
26
fn dequeue(&mut self) -> Option<T> {
27
if self.len() > 0 {
28
self.data.pop()
29
} else {
30
None
31
}
32
}
33
34
fn len(&self) -> usize {
35
self.data.len()
Callers
1
hot_potato
Function · 0.45
Calls
2
len
Method · 0.45
pop
Method · 0.45
Tested by
no test coverage detected