Rust
Rust copied to clipboard
delete head is not returning None, causing length update overflow
https://github.com/TheAlgorithms/Rust/blob/6189823b425df0a172a60d87f3b2e982f3e5dee2/src/data_structures/linked_list.rs#L199
it looks the implementation of drop is flawed and delete head is not returning none to terminate the drop process appropriately.
@imp2002 ^^^
Hey, Is this open to take ?
Yes, it is
Hey will take it. As I see if delete_head does not return None, still the drop should terminate. Can you give me bit context as to what is causing this lenth update overflow.
@RoKu1 https://github.com/zinking/Coursera/blob/master/rust-course/src/ds/linked_list.rs it could be my re-imp problem. I ended up using linked list size as loop variable.
Hi, I took a look at your implementation. The current in implementation I do not see anywhere that the delete_head won't return None. I guess this can be closed @siriak
@zinking please add more information, and I'll reopen this issue if it's still relevant