Skip to content

Commit 9ecb58d

Browse files
committed
de-parenthesize
1 parent 9f9313f commit 9ecb58d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/items/unions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ Unions have no notion of an "active field". Instead, every union access just
4141
interprets the storage at the type of the field used for the access. Reading a
4242
union field reads the bits of the union at the field's type. It is the
4343
programmer's responsibility to make sure that the data is valid at that
44-
type. Failing to do so results in undefined behavior (for example, reading the
45-
value `3` at type `bool` is undefined behavior). Effectively, writing to and
46-
then reading from a union is equivalent to a [`transmute`] from the type used
47-
for writing to the type used for reading.
44+
type. Failing to do so results in undefined behavior. For example, reading the
45+
value `3` at type `bool` is undefined behavior. Effectively, writing to and then
46+
reading from a union is equivalent to a [`transmute`] from the type used for
47+
writing to the type used for reading.
4848

4949
Consequently, all reads of union fields have to be placed in `unsafe` blocks:
5050

0 commit comments

Comments
 (0)