diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2014-02-28 00:02:27 +0200 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2014-03-13 14:21:45 +0200 |
| commit | cdc18b96d6aa38c22b4fa9715c974ef986ad250d (patch) | |
| tree | 9a0fae0250cb35e67a2f966ed6e17eb0a7afaef1 /src/libstd/hash | |
| parent | 12b2607572d6233a1d4b4f7592573e49b505771e (diff) | |
| download | rust-cdc18b96d6aa38c22b4fa9715c974ef986ad250d.tar.gz rust-cdc18b96d6aa38c22b4fa9715c974ef986ad250d.zip | |
Remove Rc's borrow method to avoid conflicts with RefCell's borrow in Rc<RefCell<T>>.
Diffstat (limited to 'src/libstd/hash')
| -rw-r--r-- | src/libstd/hash/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/hash/mod.rs b/src/libstd/hash/mod.rs index 6c0ae280ed0..dd40f600873 100644 --- a/src/libstd/hash/mod.rs +++ b/src/libstd/hash/mod.rs @@ -66,6 +66,7 @@ use container::Container; use io::Writer; use iter::Iterator; +use ops::Deref; use option::{Option, Some, None}; use rc::Rc; use str::{Str, StrSlice}; @@ -246,7 +247,7 @@ impl<S: Writer, T: Hash<S>> Hash<S> for @T { impl<S: Writer, T: Hash<S>> Hash<S> for Rc<T> { #[inline] fn hash(&self, state: &mut S) { - self.borrow().hash(state); + self.deref().hash(state); } } |
