Skip to content

Add map to SlotMap - #155

Open
tsoutsman wants to merge 1 commit into
orlp:masterfrom
tsoutsman:add-map
Open

Add map to SlotMap#155
tsoutsman wants to merge 1 commit into
orlp:masterfrom
tsoutsman:add-map

Conversation

@tsoutsman

@tsoutsman tsoutsman commented Jun 17, 2026

Copy link
Copy Markdown

Similar to #133, but now the map function takes self i.e.

pub fn map<U, F>(self, mut f: F) -> SlotMap<K, U>
where
        F: FnMut(K, V) -> U

Closes #80

Similar to orlp#133, but now the `map` function takes `self` i.e.

```
pub fn map<U, F>(self, mut f: F) -> SlotMap<K, U>
where
        F: FnMut(K, V) -> U
```

Signed-off-by: Klim Tsoutsman <klim@tsoutsman.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow converting values, preserving keys

1 participant