about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-08-17 09:48:40 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2014-08-17 10:16:48 +1000
commit7b141ad99b620e6b2e7879875f0672f1c634752c (patch)
treeda472f57b2ea174c2da1aef75421227da7612c72 /src
parent85fd37f876dad1d4db02208f8a56f02228d975b0 (diff)
collections: deprecate BTree.
This is very half-baked at the moment and very inefficient, e.g.
inappropriate use of by-value `self` (and thus being forced into an
overuse of `clone`). People get the wrong impression about Rust when
using it, e.g. that Rust cannot express what other languages can because
the implementation is inefficient.
Diffstat (limited to 'src')
-rw-r--r--src/libcollections/btree.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libcollections/btree.rs b/src/libcollections/btree.rs
index 4c5f8ef0987..2a9d722d16a 100644
--- a/src/libcollections/btree.rs
+++ b/src/libcollections/btree.rs
@@ -11,6 +11,13 @@
 // btree.rs
 //
 
+// NB. this is not deprecated for removal, just deprecating the
+// current implementation. If the major pain-points are addressed
+// (overuse of by-value self and .clone), this can be removed.
+#![deprecated = "the current implementation is extremely inefficient, \
+                 prefer a HashMap, TreeMap or TrieMap"]
+#![allow(deprecated)]
+
 //! Starting implementation of a btree for rust.
 //! Structure inspired by github user davidhalperin's gist.