From e0d33dae2f2ab70b936467590284030d759f9db7 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Wed, 20 Feb 2019 11:47:25 +0000 Subject: Add static assertions for Request and Response size The Request and Response types have to have a size of 64 bytes. Previously, we only verified this property by visual inspection. Accidental changes to the size could lead to runtime errors. This patch adds static assertions using the static_assertions crate to enforce this property at compile time. --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index b5f2c65..0d773d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,7 @@ cortex-m-rt = "0.6.7" embedded-hal = "0.2.2" panic-halt = "0.2.0" serde-big-array = "0.1.4" +static_assertions = "0.3.1" stm32f103xx-usb = { git = "https://github.com/mvirkkunen/stm32f103xx-usb", rev = "57d23751367461bec5f39322727bdd65e5c2aa30" } usb-device = { git = "https://github.com/mvirkkunen/usb-device", rev = "e58e30f3b9c9bf4aab00ea039d129b964a3fd2d3" } -- cgit v1.2.1