wtachau opened PR #9860 from wtachau:add-debug-default-impls-sparse-map
to bytecodealliance:main
:
https://github.com/bytecodealliance/wasmtime/issues/9856
Add
Default
andDebug
trait impls toSparseMap
(for the latter, only implDebug
ifK
andV
implDebug
).
wtachau requested fitzgen for a review on PR #9860.
wtachau requested wasmtime-compiler-reviewers for a review on PR #9860.
pchickey requested cfallin for a review on PR #9860.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
The sparse and dense fields are not exposed to the user and rather useless unless you know how the implementation lf SparseMap works. I would much rather prefer the Debug impl being like that of HashMap showing the logical mapping from keys to values. So for example
{ v0: "a", v2: "b" }
for aSparseMap<Value, String>
. This can be done using something likef.debug_map().entries(entries).finish()
whereentries
is an iterator over the map entries.
wtachau updated PR #9860.
wtachau submitted PR review.
wtachau created PR review comment:
makes sense! updated.
cfallin submitted PR review:
LGTM, thanks!
cfallin has enabled auto merge for PR #9860.
wtachau edited PR #9860:
https://github.com/bytecodealliance/wasmtime/issues/9856
Add
Default
andDebug
trait impls toSparseMap
(for the latter, only implDebug
ifK
andV
implDebug
).closes #9856
cfallin merged PR #9860.
Last updated: Dec 23 2024 at 13:07 UTC