Skip to content

Commit 635f736

Browse files
committed
Rework Rc for FCP of rust-lang#27718
* Add `Rc::would_unwrap(&Self) -> bool` to introspect whether try_unwrap would succeed, because it's destructive (unlike get_mut). * Move `rc.downgrade()` to `Rc::downgrade(&Self)` per conventions. * Deprecate `Rc::weak_count` and `Rc::strong_count` for questionable utility. * Deprecate `Rc::is_unique` for questionable semantics (there are two kinds of uniqueness with Weak pointers in play). * Rename `rc.make_unique()` to `Rc::make_mut(&mut Self)` per conventions, to avoid uniqueness terminology, and to clarify the relation to `Rc::get_mut`.
1 parent aca2057 commit 635f736

File tree

1 file changed

+117
-82
lines changed

1 file changed

+117
-82
lines changed

0 commit comments

Comments
 (0)