From 439e31cd0d5f7ad8f4443b312e86fedf1701f3ac Mon Sep 17 00:00:00 2001 From: Per Lindgren <per.lindgren@ltu.se> Date: Thu, 13 Dec 2018 21:28:03 +0100 Subject: [PATCH] dropped nightly requiremet, README --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c36aab..74673ce 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ Adds debug to volatile register when compiled with `--features debug-fmt`. +## Caveats + +Notice, the current implementation of `array-debug` (see `examples/example2.rs`) requires a nightly toolchain (`#![feature(unsize)]`). This is however an "opt-in", and needed to support `#[derive(Debug)]` for cases with (register) arrays larger than 32 elements. + ``` rust extern crate volatile_register; @@ -39,7 +43,7 @@ Nvic { iser: [0xB618860, 0x7FFE, 0x20, 0x0, 0x0, 0x7F70, 0x30, 0x0], reserved0: Registers will be formatted under `UpperHex`, notice in the example that arrays are of size less than 32, hence `Debug` of array (`[T; N]`) is implemented by default. Notice that the `reserved` fields falls back to the default integer formatting (as not wrapped by the `volatile-register` abstraction). -For register arrays with more then 32 items, `array-debug` provides a newtype over array, replicating the array behavior while providing `Debug`. +For register arrays with more then 32 elements, `array-debug` provides a newtype over array, replicating the array behavior while providing `Debug`. ``` rust extern crate array_debug; -- GitLab