From bd86f059130de95b63b418d9deff4934b8af150c Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Sat, 27 Jul 2024 14:16:06 +0200 Subject: [PATCH] WIP: bumping atomic crate is stuck on non-fieldless enums Signed-off-by: Pierre Fenoll --- Cargo.toml | 3 ++- examples/demo.rs | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 59141d6..568ac5b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,10 +12,11 @@ edition = "2021" [dependencies] log = "0.4.14" once_cell = "1.9.0" -atomic = "0.5.1" cgmath = "0.18.0" libc = "0.2.69" +atomic = "0.6.0" +bytemuck = { version = "1.13.1", features = ["derive"] } # framebuffer memmap2 = { version = "0.5.2", optional = true } diff --git a/examples/demo.rs b/examples/demo.rs index f9c3b82..7c83558 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -28,7 +28,10 @@ use std::sync::Mutex; use std::thread::sleep; use std::time::Duration; -#[derive(Copy, Clone, PartialEq)] +use bytemuck::NoUninit; + +#[derive(Copy, Clone, PartialEq, NoUninit)] +#[repr(i64)] enum DrawMode { Draw(u32), Erase(u32),