Stream: git-wasmtime

Topic: wasmtime / issue #1161 Should SecondaryMap require Defaul...


view this post on Zulip Wasmtime GitHub notifications bot (May 04 2022 at 23:07):

cfallin commented on issue #1161:

Doing some issue gardening: I think that this is probably worth closing (thanks Ben for exploring it though!) as it doesn't seem like the refactor complexity is worth it, and as noted above the stored default value is still required to keep the indexing API (return value by ref) the same, so there is no memory-size benefit.

view this post on Zulip Wasmtime GitHub notifications bot (May 04 2022 at 23:07):

cfallin closed issue #1161:

SecondaryMap requires its value to be Clone-able, and the only constructor requires the given default value to implement Default. This implies each SecondaryMap stores the default value, while we could just require Default and use Default::default() everywhere we use self.default.clone(). It would also allow using SecondaryMaps for things that implement Default but aren't Clone-able (I've got such a use case in a WIP PR).


Last updated: Dec 23 2024 at 12:05 UTC