From b06599a7a8001914d64ec191a073684362f5b9b2 Mon Sep 17 00:00:00 2001 From: Kevin Cantu Date: Fri, 31 Aug 2012 15:54:01 -0700 Subject: [PATCH] Demode fun_treemap.rs --- src/libstd/fun_treemap.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libstd/fun_treemap.rs b/src/libstd/fun_treemap.rs index e7780c51826..2cd5f8e24d1 100644 --- a/src/libstd/fun_treemap.rs +++ b/src/libstd/fun_treemap.rs @@ -1,4 +1,6 @@ #[deny(non_camel_case_types)]; +#[forbid(deprecated_mode)]; +#[forbid(deprecated_pattern)]; /*! * A functional key,value store that works on anything. @@ -32,8 +34,8 @@ enum TreeNode { fn init() -> Treemap { @Empty } /// Insert a value into the map -fn insert(m: Treemap, k: K, v: V) - -> Treemap { +fn insert(m: Treemap, +k: K, +v: V) + -> Treemap { @match m { @Empty => Node(@k, @v, @Empty, @Empty), @Node(@kk, vv, left, right) => { @@ -47,7 +49,7 @@ fn insert(m: Treemap, k: K, v: V) } /// Find a value based on the key -fn find(m: Treemap, k: K) -> Option { +fn find(m: Treemap, +k: K) -> Option { match *m { Empty => None, Node(@kk, @v, left, right) => {