Remove redundant function parameter

This commit is contained in:
Hanno Braun 2024-11-25 23:00:05 +01:00
parent 12b01648bd
commit 322200ed12
2 changed files with 4 additions and 10 deletions

View File

@ -106,10 +106,8 @@ impl ApplicationHandler for App {
window.request_redraw();
}
WindowEvent::RedrawRequested => {
if let Some(selected) = self.ops.selected() {
if let Err(err) = renderer.render(selected, &self.ops) {
eprintln!("Render error: {err}");
}
if let Err(err) = renderer.render(&self.ops) {
eprintln!("Render error: {err}");
}
}
_ => {}

View File

@ -3,7 +3,7 @@ use std::sync::Arc;
use anyhow::anyhow;
use winit::window::Window;
use crate::geometry::{Operation, OpsLog};
use crate::geometry::OpsLog;
use super::{geometry::Geometry, pipelines::Pipelines, text::TextRenderer};
@ -87,11 +87,7 @@ impl Renderer {
})
}
pub fn render(
&mut self,
_: &dyn Operation,
all_operations: &OpsLog,
) -> anyhow::Result<()> {
pub fn render(&mut self, all_operations: &OpsLog) -> anyhow::Result<()> {
let Some(selected_operation) = all_operations.selected() else {
return Ok(());
};