]> git.lizzy.rs Git - rust.git/commit
Implement Eq for Cell and RefCell.
authorSimon Sapin <simon.sapin@exyr.org>
Sun, 24 May 2015 08:38:59 +0000 (10:38 +0200)
committerSimon Sapin <simon.sapin@exyr.org>
Sun, 24 May 2015 08:38:59 +0000 (10:38 +0200)
commitbbf8ba7c2351caba1b585346e5709f8eb476f169
tree86db90d256b1ecd5d413e71c7d658347318dc082
parent0fc0476e6ae2bcc5cce75d78548cf037b6692a97
Implement Eq for Cell and RefCell.

`core::cell::Cell<T>` and `core::cell::RefCell<T>` currently implement
`PartialEq` when `T` does, and just defer to comparing `T` values.
There is no reason the same shouldn’t apply to `Eq`.

This enables `#[derive(Eq, PartialEq)]` on e.g.
structs that have a `RefCell` field.
src/libcore/cell.rs