diff --git a/source/tanya/container/list.d b/source/tanya/container/list.d index 4c99906..fe62b5f 100644 --- a/source/tanya/container/list.d +++ b/source/tanya/container/list.d @@ -560,28 +560,12 @@ struct SList(T) assert(l1 == l2); } - /** - * Returns: How many elements are in the list. - */ + deprecated @property size_t length() const { return count(this[]); } - /// - @nogc nothrow pure @safe unittest - { - SList!int l; - - l.insertFront(8); - l.insertFront(9); - assert(l.length == 2); - l.removeFront(); - assert(l.length == 1); - l.removeFront(); - assert(l.length == 0); - } - /** * Comparison for equality. * @@ -1815,28 +1799,12 @@ struct DList(T) return insertAfter!(T[])(r, el[]); } - /** - * Returns: How many elements are in the list. - */ + deprecated @property size_t length() const { return count(this[]); } - /// - @nogc nothrow pure @safe unittest - { - DList!int l; - - l.insertFront(8); - l.insertFront(9); - assert(l.length == 2); - l.removeFront(); - assert(l.length == 1); - l.removeFront(); - assert(l.length == 0); - } - /** * Comparison for equality. *