You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The lookup logic heavily overlaps between both TreeDB and TreeDBMut, specifically lookup(..) and lookup_leaf_node(..) methods. We should extract the logic to a separate module such that the logic can be shared. In the module we should create a struct that implements both these methods. The struct should look something like:
We should then modify both TreeDB and TreeDBMut to leverage the methods exposed from this struct.
It may be useful to implement the From trait on TreeDB and TreeDBMut for Lookup such that we can easily construct a Lookup struct using Lookup::from(..) when doing lookups.
The text was updated successfully, but these errors were encountered:
The lookup logic heavily overlaps between both
TreeDB
andTreeDBMut
, specificallylookup(..)
andlookup_leaf_node(..)
methods. We should extract the logic to a separate module such that the logic can be shared. In the module we should create a struct that implements both these methods. The struct should look something like:We should then modify both
TreeDB
andTreeDBMut
to leverage the methods exposed from this struct.It may be useful to implement the
From
trait onTreeDB
andTreeDBMut
forLookup
such that we can easily construct aLookup
struct usingLookup::from(..)
when doing lookups.The text was updated successfully, but these errors were encountered: