]> git.lizzy.rs Git - rust.git/commitdiff
collections: deprecate BTree.
authorHuon Wilson <dbau.pp+github@gmail.com>
Sat, 16 Aug 2014 23:48:40 +0000 (09:48 +1000)
committerHuon Wilson <dbau.pp+github@gmail.com>
Sun, 17 Aug 2014 00:16:48 +0000 (10:16 +1000)
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.

src/libcollections/btree.rs

index 4c5f8ef09879e06ee898940db4de26278c771ec4..2a9d722d16a0cd053eb146abceb83f80d814cdcb 100644 (file)
 // 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.