Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: indexes fix in serialization-of-cairo-types #1307

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ Consider the following definition of an enum named `Week`:
[source,cairo]
----
enum Week {
Sunday: (), // Index=1. The variant type is the unit type.
Monday: u256, // Index=2. The variant type is u256.
Sunday: (), // Index=0. The variant type is the unit type.
Monday: u256, // Index=1. The variant type is u256.
}
----

Expand All @@ -162,8 +162,8 @@ Now consider instantiations of the `Week` enum's variants as shown in the table
|===
|Instance |Description |Serialization

|`Week::Sunday` | Index=`1`. The variant's type is the unit type. | `[1]`
|`Week::Monday(5)` a| Index=`2`. The variant's type is `u256`.| `[2,5,0]`
|`Week::Sunday` | Index=`0`. The variant's type is the unit type. | `[1]`
|`Week::Monday(5)` a| Index=`1`. The variant's type is `u256`.| `[2,5,0]`
|===

.Enum serialization example 2
Expand Down