Update name of struct field

This commit is contained in:
Hanno Braun 2024-12-10 18:51:40 +01:00
parent c4c139644e
commit bab95fbdbc

View File

@ -1,20 +1,20 @@
use crate::geometry::Operation; use crate::geometry::Operation;
pub struct OperationView { pub struct OperationView {
ops_log: Box<dyn Operation>, operation: Box<dyn Operation>,
selected: usize, selected: usize,
} }
impl OperationView { impl OperationView {
pub fn new(operation: impl Operation + 'static) -> Self { pub fn new(operation: impl Operation + 'static) -> Self {
Self { Self {
ops_log: Box::new(operation), operation: Box::new(operation),
selected: 0, selected: 0,
} }
} }
pub fn operations(&self) -> Vec<(Box<dyn Operation>, bool)> { pub fn operations(&self) -> Vec<(Box<dyn Operation>, bool)> {
self.ops_log self.operation
.children() .children()
.into_iter() .into_iter()
.enumerate() .enumerate()