Inline method call

There's only one call site left and the method is pretty simple, so no
good reason to keep it.
This commit is contained in:
Hanno Braun 2022-04-12 16:03:49 +02:00
parent 49c533fb82
commit 3156ae2624

View File

@ -117,7 +117,11 @@ fn main() -> anyhow::Result<()> {
if let Some(new_shape) = watcher.receive() { if let Some(new_shape) = watcher.receive() {
let new_shape = shape_processor.process(&new_shape); let new_shape = shape_processor.process(&new_shape);
new_shape.update_geometry(&mut renderer); renderer.update_geometry(
(&new_shape.mesh).into(),
(&new_shape.debug_info).into(),
new_shape.aabb,
);
if camera.is_none() { if camera.is_none() {
camera = Some(Camera::new(&new_shape.aabb)); camera = Some(Camera::new(&new_shape.aabb));
@ -267,13 +271,3 @@ struct ProcessedShape {
mesh: Mesh<Point<3>>, mesh: Mesh<Point<3>>,
debug_info: DebugInfo, debug_info: DebugInfo,
} }
impl ProcessedShape {
fn update_geometry(&self, renderer: &mut Renderer) {
renderer.update_geometry(
(&self.mesh).into(),
(&self.debug_info).into(),
self.aabb,
);
}
}