algorithm icon indicating copy to clipboard operation
algorithm copied to clipboard

Mark find function as unsafe

Open kitcatier opened this issue 2 years ago • 0 comments

Hello, I found a soundness issue in this crate. https://github.com/douchuan/algorithm/blob/a836b53f6b9059d74d0d4b064f8d2e1887e790fb/src/ll/kth2tail.rs#L9-L11 The unsafe function called do_find() needs to meet the corresponding safety requirements of the parameters, and the developer who calls the find() function may not notice this safety requirement. Marking them unsafe also means that callers must make sure they know what they're doing.

kitcatier avatar Mar 17 '23 01:03 kitcatier