slotmap icon indicating copy to clipboard operation
slotmap copied to clipboard

Better debug output

Open aDotInTheVoid opened this issue 3 years ago • 0 comments

Currently Debug output is does by Derivieing. This prints something like

SlotMap {
                    slots: [
                        Slot {
                            version: 0,
                            next_free: 0,
                        },
                    ],
                    free_head: 1,
                    num_elems: 0,
                    _k: PhantomData,
                }

As a user of the library, this is not helpfull, as what a user would want to see is what keys and values they have, and not the interals around the free list.

A better Output would be something like

{
    1v3: "fdsf",
    3v2: "fdd",
}

aDotInTheVoid avatar Jun 23 '21 16:06 aDotInTheVoid