diff --git a/client/ts/src/utils/numbers.ts b/client/ts/src/utils/numbers.ts index cfeaaa523..40fca33d9 100644 --- a/client/ts/src/utils/numbers.ts +++ b/client/ts/src/utils/numbers.ts @@ -11,7 +11,7 @@ export function toNum(n: bignum): number { if (typeof n === 'number') { target = n; } else { - target = n.toNumber(); + target = n.toString() as any as number; } return target; } diff --git a/lib/src/red_black_tree.rs b/lib/src/red_black_tree.rs index bb3148edd..e93aa902c 100644 --- a/lib/src/red_black_tree.rs +++ b/lib/src/red_black_tree.rs @@ -198,8 +198,6 @@ impl<'a, T> RedBlackTreeReadOperationsHelpers<'a> for T where T: GetRedBlackTreeReadOnlyData<'a>, { - // TODO: Make unchecked versions of these to avoid unnecessary NIL checks - // when we already know the index is not NIL. fn get_value(&'a self, index: DataIndex) -> &'a V { debug_assert_ne!(index, NIL); let node: &RBNode = get_helper::>(self.data(), index); @@ -245,8 +243,6 @@ where } fn is_left_child(&self, index: DataIndex) -> bool { - // TODO: Explore if we can store is_left_child and is_right_child in the - // empty bits after color to avoid the compute of checking the parent. if index == self.root_index() { return false; }