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

Method remove_tail

code/chapter09/lru.rs:154–164  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

152 }
153
154 fn remove_tail(&mut self) {
155 if let Some(index) = self.tail {
156 self.remove_from_list(index);
157 let key = &self.entries[index].key;
158 self.map.remove(key);
159 }
160
161 if self.tail.is_none() {
162 self.head = None;
163 }
164 }
165}
166
167fn main() {

Callers 1

ensure_roomMethod · 0.45

Calls 2

remove_from_listMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected