cedarwood icon indicating copy to clipboard operation
cedarwood copied to clipboard

prefix search becomes a dead loop when prefix is an empty string

Open SteveLauC opened this issue 9 months ago • 0 comments

To reproduce:

use cedarwood::Cedar;  // cedarwood = "0.4.6"

fn main() {
    let mut set = Cedar::new();
    set.update("apple", 1);
    set.update("bpple", 1);

    let ids  = set.common_prefix_predict_iter("").collect::<Vec<_>>();
    println!("{:?}", ids);
}

SteveLauC avatar Apr 21 '25 06:04 SteveLauC