|
11 | 11 | #![cfg_attr(feature = "unstable", feature(core_intrinsics))]
|
12 | 12 | #![cfg_attr(feature = "unstable", feature(const_generics))]
|
13 | 13 | #![cfg_attr(feature = "unstable", allow(incomplete_features))]
|
14 |
| - |
15 | 14 | #![warn(missing_docs)]
|
16 | 15 |
|
17 | 16 | use access::{ReadOnly, ReadWrite, Readable, Writable, WriteOnly};
|
18 | 17 | #[cfg(feature = "unstable")]
|
19 | 18 | use core::intrinsics;
|
20 | 19 | use core::{
|
| 20 | + fmt, |
21 | 21 | marker::PhantomData,
|
22 | 22 | ops::Deref,
|
23 | 23 | ops::{DerefMut, Index, IndexMut},
|
24 | 24 | ptr,
|
25 |
| - slice::SliceIndex, fmt, |
| 25 | + slice::SliceIndex, |
26 | 26 | };
|
27 | 27 |
|
28 | 28 | /// Allows creating read-only and write-only `Volatile` values.
|
@@ -448,13 +448,21 @@ where
|
448 | 448 | }
|
449 | 449 | }
|
450 | 450 |
|
451 |
| -impl<R, T, A> fmt::Debug for Volatile<R, A> where R: Deref<Target = T>, T:Copy + fmt::Debug, A: Readable { |
| 451 | +impl<R, T, A> fmt::Debug for Volatile<R, A> |
| 452 | +where |
| 453 | + R: Deref<Target = T>, |
| 454 | + T: Copy + fmt::Debug, |
| 455 | + A: Readable, |
| 456 | +{ |
452 | 457 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
453 | 458 | f.debug_tuple("Volatile").field(&self.read()).finish()
|
454 | 459 | }
|
455 | 460 | }
|
456 | 461 |
|
457 |
| -impl<R> fmt::Debug for Volatile<R, WriteOnly> where R: Deref { |
| 462 | +impl<R> fmt::Debug for Volatile<R, WriteOnly> |
| 463 | +where |
| 464 | + R: Deref, |
| 465 | +{ |
458 | 466 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
459 | 467 | f.debug_tuple("Volatile").field(&"[write-only]").finish()
|
460 | 468 | }
|
|
0 commit comments