Skip to content

Commit

Permalink
Rework Rc for FCP of rust-lang#27718
Browse files Browse the repository at this point in the history
* 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`.
  • Loading branch information
Gankra committed Aug 19, 2015
1 parent aca2057 commit 635f736
Showing 1 changed file with 117 additions and 82 deletions.
Loading

0 comments on commit 635f736

Please sign in to comment.