Created
August 22, 2012 21:49
-
-
Save catamorphism/3429712 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pure fn bucket_for_key_with_hash( | |
| buckets: &[option<Bucket<K,V>>], | |
| hash: uint, | |
| k: &K) -> SearchResult<K, V> { | |
| let _ = for self.bucket_sequence(hash) |i| { | |
| match buckets[i] { | |
| some(bkt) => if bkt.hash == hash && self.eqfn(k, &bkt.key) { | |
| return Found(some(&bkt)) | |
| }, | |
| none => return Found(none) | |
| } | |
| }; | |
| return TableFull; | |
| } | |
| /Users/TimChevalier/rust/src/libcore/send_map.rs:115:42: 115:45 error: illegal borrow: borrowed pointer must be valid for the lifetime & as defined on the block at 110:41, but the borrowed value is only valid for the alt at 113:16 | |
| /Users/TimChevalier/rust/src/libcore/send_map.rs:115 return Found(some(&bkt)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment