Fix two more warnings in WebRender (#30867)

These appeared after switching to the latest Rust stable release.
This commit is contained in:
Martin Robinson 2023-12-13 09:07:56 +01:00 committed by GitHub
parent 17f3c45d4f
commit 2fcbcb4b55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 2 deletions

View file

@ -58,13 +58,13 @@ pub struct DisplayItemCache {
impl DisplayItemCache {
fn add_item(&mut self, key: ItemKey, item: CachedDisplayItem) {
let mut entry = &mut self.entries[key as usize];
let entry = &mut self.entries[key as usize];
entry.items.push(item);
entry.occupied = true;
}
fn clear_entry(&mut self, key: ItemKey) {
let mut entry = &mut self.entries[key as usize];
let entry = &mut self.entries[key as usize];
entry.items.clear();
entry.occupied = false;
}