On this (and all the other insert functions in OpenZL):
we should document how insert behaves (or should behave if it's a trait) in each case. What happens when we try to insert an element that is already there?
a) We do nothing.
b) We replace it (in the case of a Merkle tree it doesn't make sense, but thing of e.g. a HashMap).
c) We insert a duplicate.
I think specifying this in every insert implementation will save us from possible mistakes in the future.
On this (and all the other
insert
functions in OpenZL): we should document howinsert
behaves (or should behave if it's a trait) in each case. What happens when we try to insert an element that is already there? a) We do nothing. b) We replace it (in the case of a Merkle tree it doesn't make sense, but thing of e.g. a HashMap). c) We insert a duplicate. I think specifying this in everyinsert
implementation will save us from possible mistakes in the future._Originally posted by @SupremoUGH in https://github.com/openzklib/openzl/pull/36#discussion_r1047118253_