Skip to content

Commit 962950f

Browse files
committed
---
yaml --- r: 23227 b: refs/heads/master c: c1fad07 h: refs/heads/master i: 23225: ab17c03 23223: 84adc6c v: v3
1 parent b2b8915 commit 962950f

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 958df4b0031654c6e9b03997e956a21ede289660
2+
refs/heads/master: c1fad0775844a9413484fd2eaa10adcfdfbc2883
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libcore/str.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export
5454

5555
// Comparing strings
5656
eq,
57+
eq_slice,
5758
le,
5859
hash,
5960

trunk/src/libstd/map.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,12 @@ fn hashmap<K: const, V: copy>(+hasher: hashfn<K>, +eqer: eqfn<K>)
389389
chained::mk(hasher, eqer)
390390
}
391391

392+
/// Construct a hashmap for string-slice keys
393+
fn str_slice_hash<V: copy>() -> hashmap<&str, V> {
394+
return hashmap(|s| hash::hash_str(*s) as uint,
395+
|a,b| str::eq_slice(*a, *b));
396+
}
397+
392398
/// Construct a hashmap for string keys
393399
fn str_hash<V: copy>() -> hashmap<~str, V> {
394400
return hashmap(str::hash, str::eq);

0 commit comments

Comments
 (0)