From 97934d1d5517194c61b35913e8ac6f6970934312 Mon Sep 17 00:00:00 2001 From: Sam Nystrom Date: Thu, 25 May 2023 23:03:39 -0400 Subject: [PATCH] feat: implement `Copy` for `Theme` Theme isn't big enough for a clone to generate a memcpy call on 64-bit architectures, so it should be Copy. Closes #8 --- src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 16eb780..e2a08f9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -95,10 +95,8 @@ fn make_widget_visual( } } -// FIXME: Theme should be `Copy` since it isn't big enough to generate a call to `memcpy`, -// do this when egui releases a minor version /// The colors for a theme variant. -#[derive(Debug, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)] pub struct Theme { pub rosewater: Color32, pub flamingo: Color32,