PrevEntry returns the previous list element or nil.
()
| 385 | |
| 386 | // PrevEntry returns the previous list element or nil. |
| 387 | func (e *Entry[K, V]) PrevEntry() *Entry[K, V] { |
| 388 | if p := e.prev; e.list != nil && p != &e.list.root { |
| 389 | return p |
| 390 | } |
| 391 | return nil |
| 392 | } |
| 393 | |
| 394 | // LruList represents a doubly linked list. |
| 395 | // The zero Value for LruList is an empty list ready to use. |