Merge pull request #12842 from aathan/patch-4

Update mapping-types.rst
This commit is contained in:
chriseth 2022-03-24 12:12:05 +01:00 committed by GitHub
commit d39de36051
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,7 +119,7 @@ Iterable Mappings
You cannot iterate over mappings, i.e. you cannot enumerate their keys. You cannot iterate over mappings, i.e. you cannot enumerate their keys.
It is possible, though, to implement a data structure on It is possible, though, to implement a data structure on
top of them and iterate over that. For example, the code below implements an top of them and iterate over that. For example, the code below implements an
``IterableMapping`` library that the ``User`` contract then adds data too, and ``IterableMapping`` library that the ``User`` contract then adds data to, and
the ``sum`` function iterates over to sum all the values. the ``sum`` function iterates over to sum all the values.
.. code-block:: solidity .. code-block:: solidity