Skip to content

Commit fd9b04d

Browse files
committed
---
yaml --- r: 28239 b: refs/heads/try c: b06599a h: refs/heads/master i: 28237: 7459162 28235: 2953e1e 28231: 28bcd52 28223: c823efb v: v3
1 parent 218d5a2 commit fd9b04d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5-
refs/heads/try: bf430b70320ef04b983ed5ee53e234a87c27343c
5+
refs/heads/try: b06599a7a8001914d64ec191a073684362f5b9b2
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df

branches/try/src/libstd/fun_treemap.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#[deny(non_camel_case_types)];
2+
#[forbid(deprecated_mode)];
3+
#[forbid(deprecated_pattern)];
24

35
/*!
46
* A functional key,value store that works on anything.
@@ -32,8 +34,8 @@ enum TreeNode<K, V> {
3234
fn init<K, V>() -> Treemap<K, V> { @Empty }
3335

3436
/// Insert a value into the map
35-
fn insert<K: copy Eq Ord, V: copy>(m: Treemap<K, V>, k: K, v: V)
36-
-> Treemap<K, V> {
37+
fn insert<K: copy Eq Ord, V: copy>(m: Treemap<K, V>, +k: K, +v: V)
38+
-> Treemap<K, V> {
3739
@match m {
3840
@Empty => Node(@k, @v, @Empty, @Empty),
3941
@Node(@kk, vv, left, right) => {
@@ -47,7 +49,7 @@ fn insert<K: copy Eq Ord, V: copy>(m: Treemap<K, V>, k: K, v: V)
4749
}
4850

4951
/// Find a value based on the key
50-
fn find<K: Eq Ord, V: copy>(m: Treemap<K, V>, k: K) -> Option<V> {
52+
fn find<K: Eq Ord, V: copy>(m: Treemap<K, V>, +k: K) -> Option<V> {
5153
match *m {
5254
Empty => None,
5355
Node(@kk, @v, left, right) => {

0 commit comments

Comments
 (0)