Checking equality when we delete

[?]
May 2, 2021, 9:06 AM
R27IKHPAAJTHCVTLIIRI2NCLMTYXRDU6KETMGYARFDZTQW373JHQC

Dependencies

  • [2] DASFQGOR Debugging
  • [3] WS4ZQM4R Debugging, tests, etc.
  • [4] OFINGD26 implementing prev() on cursors (+ some cleanup)
  • [5] HN6Z5DU4 Cleanup
  • [6] OTWDDJE7 Trait/type cleanup
  • [7] QYDGYIZR Split trait Representable into its mandatory part and an optional part
  • [8] UUUVNC4D Debugging/cleanup around cursors
  • [9] TSMS6W4D Fully commented implementation of Sized nodes + massive cleanup
  • [10] OP6SVMOD Resetting history

Change contents

  • replacement in sanakirja-core/src/btree/del.rs at line 81
    [2.6638][3.11745:11790](),[3.11745][3.11745:11790]()
    V: Storable + ?Sized + core::fmt::Debug,
    [2.6638]
    [3.15929]
    V: Storable + ?Sized + core::fmt::Debug + PartialEq,
  • replacement in sanakirja-core/src/btree/del.rs at line 90
    [3.9635][3.37282:37330](),[3.37330][3.7504:7559](),[3.7504][3.7504:7559](),[3.385][3.53628:53654](),[3.7559][3.53628:53654](),[3.53628][3.53628:53654]()
    if cursor.set(txn, key, value)?.is_none() {
    // If the key and value weren't found, return.
    return Ok(false);
    [3.9635]
    [3.53654]
    // If the key and value weren't found, return.
    match (cursor.set(txn, key, value)?, value) {
    (Some((k, v)), Some(value)) if k == key && v == value => {}
    (Some((k, _)), None) if k == key => {}
    _ => return Ok(false),