From c4c139644ee5976f4d84faa237949bca298d04d6 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 10 Dec 2024 18:45:40 +0100 Subject: [PATCH] Make `OperationView` work with any operation --- experiments/2024-12-09/src/ui.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/experiments/2024-12-09/src/ui.rs b/experiments/2024-12-09/src/ui.rs index 782297164..868bb4116 100644 --- a/experiments/2024-12-09/src/ui.rs +++ b/experiments/2024-12-09/src/ui.rs @@ -1,14 +1,14 @@ -use crate::geometry::{Operation, OpsLog}; +use crate::geometry::Operation; pub struct OperationView { - ops_log: OpsLog, + ops_log: Box, selected: usize, } impl OperationView { - pub fn new(operation: OpsLog) -> Self { + pub fn new(operation: impl Operation + 'static) -> Self { Self { - ops_log: operation, + ops_log: Box::new(operation), selected: 0, } }