We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 087e6bf commit 270d430Copy full SHA for 270d430
[refs]
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9
-refs/heads/incoming: bf430b70320ef04b983ed5ee53e234a87c27343c
+refs/heads/incoming: b06599a7a8001914d64ec191a073684362f5b9b2
10
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
11
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
12
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
branches/incoming/src/libstd/fun_treemap.rs
@@ -1,4 +1,6 @@
1
#[deny(non_camel_case_types)];
2
+#[forbid(deprecated_mode)];
3
+#[forbid(deprecated_pattern)];
4
5
/*!
* A functional key,value store that works on anything.
@@ -32,8 +34,8 @@ enum TreeNode<K, V> {
32
34
fn init<K, V>() -> Treemap<K, V> { @Empty }
33
35
36
/// Insert a value into the map
-fn insert<K: copy Eq Ord, V: copy>(m: Treemap<K, V>, k: K, v: V)
- -> Treemap<K, V> {
37
+fn insert<K: copy Eq Ord, V: copy>(m: Treemap<K, V>, +k: K, +v: V)
38
+ -> Treemap<K, V> {
39
@match m {
40
@Empty => Node(@k, @v, @Empty, @Empty),
41
@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)
47
49
}
48
50
51
/// Find a value based on the key
-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> {
53
match *m {
54
Empty => None,
55
Node(@kk, @v, left, right) => {
0 commit comments