mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Logging fixes.
I had these lying around in the other bug.
This commit is contained in:
parent
d50946933d
commit
cceaf7c619
2 changed files with 17 additions and 0 deletions
|
@ -31,6 +31,11 @@ impl<K: PartialEq> LRUCache<K> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns the number of elements in the cache.
|
||||
pub fn num_entries(&self) -> usize {
|
||||
self.entries.len()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
/// Touch a given position, and put it in the last item on the list.
|
||||
pub fn touch(&mut self, pos: usize) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue