Skip to content

Unsoundly mark unsafe function as safe in crate Ngrammatic #2141

@lwz23

Description

@lwz23

see compenguy/ngrammatic#13 for detail.
following function are unsound:

pub fn ngram_from_id(&self, ngram_id: usize) -> NG {
        unsafe { self.ngrams.get_unchecked(ngram_id) }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions