Skip to content

Maybe remove the 'unreachable' crate dependency? #128

Closed
@frewsxcv

Description

@frewsxcv

rust-smallvec/lib.rs

Lines 48 to 49 in feb3e45

extern crate unreachable;
use unreachable::UncheckedOptionExt;

unsafe { self.pop().unchecked_unwrap() }

Seems like we might be able to replace this usage with this:

use std::hint;

// ...

unsafe {
    self.pop().unwrap_or_else(hint::unreachable_unchecked)
}

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