1
0
Fork 0
forked from wry/wry

render: implement a vulkan renderer

This commit is contained in:
Julian Orth 2024-02-03 15:19:20 +01:00
parent 4ba8550da8
commit cf332e8436
66 changed files with 4287 additions and 239 deletions

View file

@ -0,0 +1,17 @@
use std::mem;
pub struct OnDrop<F>(pub F)
where
F: FnMut() + Copy;
impl<F: FnMut() + Copy> OnDrop<F> {
pub fn forget(self) {
mem::forget(self);
}
}
impl<F: FnMut() + Copy> Drop for OnDrop<F> {
fn drop(&mut self) {
(self.0)();
}
}