alexcrichton / alexcrichton/debug-cell

feature request, Ref::map, RefMut::map

Open
#7 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
24
Forks
13
PR merge metrics
No merged PRs in 30d

Description

same feature with std::cell::Ref::map, std::cell::RefMut::map

ex)
```

struct Foo {
bar:i32
}

let cell = RefCell::new(Foo { bar: 1 });

let cell_ref = cell.borrow();
let cell_ref_bar = Ref::map(cell_ref, |v| &v.bar);

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.