Skip to content

Commit 3d4a3c8

Browse files
pcaversacciocameel
authored andcommitted
docs: fix unnecessary uint160(bytes20(b)) casting
Resolves: #16129.
1 parent aef512f commit 3d4a3c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/types/value-types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ Operators:
229229
To reduce conversion ambiguity, starting with version 0.4.24, the compiler will force you to make the truncation explicit in the conversion.
230230
Take for example the 32-byte value ``0x111122223333444455556666777788889999AAAABBBBCCCCDDDDEEEEFFFFCCCC``.
231231

232-
You can use ``address(uint160(bytes20(b)))``, which results in ``0x111122223333444455556666777788889999aAaa``,
232+
You can use ``address(bytes20(b))``, which results in ``0x111122223333444455556666777788889999aAaa``,
233233
or you can use ``address(uint160(uint256(b)))``, which results in ``0x777788889999AaAAbBbbCcccddDdeeeEfFFfCcCc``.
234234

235235
.. note::

0 commit comments

Comments
 (0)