Skip to content

Commit 8be2e20

Browse files
committed
style(docs): format map example
Signed-off-by: Martin Kröning <[email protected]>
1 parent d45ab47 commit 8be2e20

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/volatile_ptr/operations.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,12 @@ where
191191
///
192192
/// // DON'T DO THIS:
193193
/// let mut readout = 0;
194-
/// unsafe { volatile.map(|value| {
195-
/// readout = *value.as_ptr(); // non-volatile read, might lead to bugs
196-
/// value
197-
/// })};
194+
/// unsafe {
195+
/// volatile.map(|value| {
196+
/// readout = *value.as_ptr(); // non-volatile read, might lead to bugs
197+
/// value
198+
/// });
199+
/// };
198200
/// ```
199201
///
200202
/// ## Safety

0 commit comments

Comments
 (0)