mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-03 17:38:27 +00:00
Simplify function parameter
This commit is contained in:
parent
03d7579b91
commit
a9f95d442b
@ -8,10 +8,14 @@ use winit::{
|
||||
window::{Window, WindowAttributes, WindowId},
|
||||
};
|
||||
|
||||
use crate::{geometry::OpsLog, render::Renderer, ui::OperationView};
|
||||
use crate::{
|
||||
geometry::{AnyOp, OpsLog},
|
||||
render::Renderer,
|
||||
ui::OperationView,
|
||||
};
|
||||
|
||||
pub fn run(ops: OpsLog) -> anyhow::Result<()> {
|
||||
let mut ops = OperationView::new(ops);
|
||||
let mut ops = OperationView::new(AnyOp::new(ops));
|
||||
ops.select_last();
|
||||
|
||||
let event_loop = EventLoop::new()?;
|
||||
|
@ -8,9 +8,9 @@ pub struct OperationView {
|
||||
}
|
||||
|
||||
impl OperationView {
|
||||
pub fn new(operation: impl Operation + 'static) -> Self {
|
||||
pub fn new(operation: AnyOp) -> Self {
|
||||
Self {
|
||||
operation: AnyOp::new(operation),
|
||||
operation,
|
||||
selected: None,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user