Skip to content

Mark find function as unsafe #2

@kitcatier

Description

@kitcatier

Hello, I found a soundness issue in this crate.

pub fn find<T>(l: &LinkedList<T>, k: usize) -> Option<NonNull<Node<T>>> {
unsafe { do_find(l.head, k) }
}

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions