Skip to content

Commit

Permalink
Remove delete function, inline code in Drop impl
Browse files Browse the repository at this point in the history
  • Loading branch information
profan authored and not-fl3 committed May 3, 2024
1 parent e45a13c commit 7faf16a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/text/atlas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ pub struct Atlas {

impl Drop for Atlas {
fn drop(&mut self) {
self.delete();
let ctx = &mut get_context().quad_context;
ctx.delete_texture(self.texture);
}
}

Expand Down Expand Up @@ -190,8 +191,4 @@ impl Atlas {
);
}
}
fn delete(&mut self) {
let ctx = &mut get_context().quad_context;
ctx.delete_texture(self.texture);
}
}

0 comments on commit 7faf16a

Please sign in to comment.