From 0dc4d5b37d5ad5ffdf2df8d6a5943f0c640d8c10 Mon Sep 17 00:00:00 2001 From: aprzn Date: Mon, 6 Feb 2023 10:47:43 -0500 Subject: [PATCH] made editorwidget a type instead of a struct for now, we'll see if this has any negative ramifications later --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7c24fe5..bda62f3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,11 +32,11 @@ struct Editor { pts_per_second: f32, } -struct EditorWidget<'a> { editor: &'a mut Editor } +type EditorWidget<'a> = &'a mut Editor; impl Editor { pub fn widget(&mut self) -> EditorWidget { - EditorWidget { editor: self } + self } }