From 8d9241e033e1babeccee49ab848c15edd8831516 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 18 Feb 2019 11:39:39 +0000 Subject: Add enum_u8 macro to simplify enum conversion We need several enums that map to a u8 value. This patch adds the enum_u8 macro that automatically derives the From and TryFrom macros for an enum to make these conversions easier. As TryFrom is not stable yet, we add our own TryFrom trait. --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index b0ecafd..3857967 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,6 +6,9 @@ extern crate panic_halt; +#[macro_use] +mod util; + mod device; mod hid; -- cgit v1.2.1