Skip to content

Commit 0733990

Browse files
committed
Fix code sample output in unchecked-uninit.md
`dbg!()` prints to stderr, which I assume is the reason there is no visible output when running the example in the book. By using `println!()` instead, the output becomes visible.
1 parent c76a20f commit 0733990

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/unchecked-uninit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ let x = {
4343
unsafe { mem::transmute::<_, [Box<u32>; SIZE]>(x) }
4444
};
4545

46-
dbg!(x);
46+
println!("{x:?}");
4747
```
4848

4949
This code proceeds in three steps:

0 commit comments

Comments
 (0)