Skip to content
Snippets Groups Projects
Commit 017ee7d8 authored by Per Lindgren's avatar Per Lindgren
Browse files

dropped nightly requiremet

parent dd032be5
No related branches found
No related tags found
No related merge requests found
......@@ -7,10 +7,6 @@
Adds debug to volatile register when compiled with `--features debug-fmt`.
## Caveats
Notice, the current implementation requres a nightly toolchain (`feature(specilization`)).
This can be
``` rust
extern crate volatile_register;
......
//! Example to show the use of debug output for small register arrays
//! Example to show the use of `Debug` formatting for small register arrays
//!
//! > cargo run --example example2 --features debug-fmt
//!
......
//! Example to show the use of debug output for big register arrays
//! Example to show the use of ¡Debug` formatting for big register arrays
//!
//! > cargo run --example example2 --features debug-fmt
//!
......
......@@ -27,13 +27,11 @@
#![deny(missing_docs)]
#![no_std]
#![cfg_attr(feature = "debug-fmt", feature(specialization))]
extern crate vcell;
#[cfg(feature = "debug-fmt")]
use core::fmt::{self, Debug, UpperHex};
#[cfg(feature = "debug-fmt")]
use vcell::VolatileCell;
/// Read-Only register
......@@ -44,16 +42,6 @@ where
register: VolatileCell<T>,
}
#[cfg(feature = "debug-fmt")]
impl<T> fmt::Debug for RO<T>
where
T: Copy + Debug,
{
default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self.read())
}
}
#[cfg(feature = "debug-fmt")]
impl<T> fmt::Debug for RO<T>
where
......@@ -75,16 +63,6 @@ where
}
}
#[cfg(feature = "debug-fmt")]
impl<T> fmt::Debug for RW<T>
where
T: Copy + Debug,
{
default fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self.read())
}
}
#[cfg(feature = "debug-fmt")]
impl<T> fmt::Debug for RW<T>
where
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment