Skip to content

Commit

Permalink
Fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
gents83 committed Nov 13, 2023
1 parent b6d61da commit c8a60e2
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions wgpu-core/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,20 @@ where
match std::mem::replace(&mut self.map[index], element) {
Element::Vacant => {}
Element::Occupied(_, storage_epoch) => {
assert_ne!(epoch, storage_epoch, "Index {index:?} of {} is already occupied", T::TYPE);
assert_ne!(
epoch,
storage_epoch,
"Index {index:?} of {} is already occupied",
T::TYPE
);
}
Element::Error(storage_epoch, _) => {
assert_ne!(epoch, storage_epoch, "Index {index:?} of {} is already occupied with Error", T::TYPE);
assert_ne!(
epoch,
storage_epoch,
"Index {index:?} of {} is already occupied with Error",
T::TYPE
);
}
}
}
Expand All @@ -154,7 +164,11 @@ where
pub(crate) fn insert_error(&mut self, id: I, label: &str) {
log::info!("User is insering as error {}{:?}", T::TYPE, id);
let (index, epoch, _) = id.unzip();
self.insert_impl(index as usize, epoch, Element::Error(epoch, label.to_string()))
self.insert_impl(
index as usize,
epoch,
Element::Error(epoch, label.to_string()),
)
}

pub(crate) fn take_and_mark_destroyed(&mut self, id: I) -> Result<Arc<T>, InvalidId> {
Expand Down

0 comments on commit c8a60e2

Please sign in to comment.