This commit is contained in:
Oleksandr Babak 2023-06-26 18:24:17 +02:00 committed by Tshepang Mbambo
parent 54e91b0d59
commit 17fe3e9484
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ The basic rule for
being permitted in the type system is that every value must be uniquely represented. In other being permitted in the type system is that every value must be uniquely represented. In other
words: a specific value must only be representable in one specific way. For example: there is only words: a specific value must only be representable in one specific way. For example: there is only
one way to represent an array of two integers as a `ValTree`: one way to represent an array of two integers as a `ValTree`:
`ValTree::Branch(&[ValTree::Leaf(first_int), ValTree;:Leaf(second_int)])`. `ValTree::Branch(&[ValTree::Leaf(first_int), ValTree::Leaf(second_int)])`.
Even though theoretically a `[u32; 2]` could be encoded in a `u64` and thus just be a Even though theoretically a `[u32; 2]` could be encoded in a `u64` and thus just be a
`ValTree::Leaf(bits_of_two_u32)`, that is not a legal construction of `ValTree` `ValTree::Leaf(bits_of_two_u32)`, that is not a legal construction of `ValTree`
(and is very complex to do, so it is unlikely anyone is tempted to do so). (and is very complex to do, so it is unlikely anyone is tempted to do so).