From 694d3f036c8ac3055bb176c562a4105a40c252f2 Mon Sep 17 00:00:00 2001 From: Soham Zemse <22412996+zemse@users.noreply.github.com> Date: Sun, 28 Aug 2022 13:20:16 +0530 Subject: [PATCH] Mention mapping type without key value names --- docs/types/mapping-types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/types/mapping-types.rst b/docs/types/mapping-types.rst index 4379488d5ee2..f629c62970e2 100644 --- a/docs/types/mapping-types.rst +++ b/docs/types/mapping-types.rst @@ -10,7 +10,7 @@ The ``KeyType`` can be any built-in value type, ``bytes``, ``string``, or any contract or enum type. Other user-defined or complex types, such as mappings, structs or array types are not allowed. ``ValueType`` can be any type, including mappings, arrays and structs. ``KeyName`` and ``ValueName`` are -optional and can be any valid identifier that is not a type. +optional (so ``mapping(KeyType => ValueType)`` works as well) and can be any valid identifier that is not a type. You can think of mappings as `hash tables `_, which are virtually initialised such that every possible key exists and is mapped to a value whose