From 31294e57deb707f279937caf9d429bd909bd912a Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Sun, 5 Mar 2017 21:04:53 +0100 Subject: [PATCH] - remove copy-constructor like initialization in avl tree, could be ambiguous for clients of what the output might be. an explicit initialization with explicit comparator is a lot more obvious, more code, but more obvious. --- trees/avltree/avltree.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/trees/avltree/avltree.go b/trees/avltree/avltree.go index 1116349..d535ffc 100644 --- a/trees/avltree/avltree.go +++ b/trees/avltree/avltree.go @@ -48,11 +48,6 @@ func NewWithStringComparator() *Tree { return &Tree{Comparator: utils.StringComparator} } -// New returns a new empty tree with the same comparator. -func (t *Tree) New() trees.Tree { - return &Tree{Comparator: t.Comparator} -} - // Size returns the number of elements stored in the tree. func (t *Tree) Size() int { return t.size