Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QMHTMY/RustBook
/ peek_mut
Method
peek_mut
publication/code/chapter04/list_stack.rs:72–74 ·
view source on GitHub ↗
(&mut self)
Source
from the content-addressed store, hash-verified
70
}
71
72
fn peek_mut(&mut self) -> Option<&mut T> {
73
self.top.as_deref_mut().map(|node| &mut node.data)
74
}
75
76
// 以下是为链表栈实现的迭代功能
77
// into_iter: 链表栈改变,成为迭代器
Callers
1
basic
Function · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected