libpitust 0.1.2

libpitust implements random utility functions I tend to use a lot
Documentation
1
2
3
4
5
6
7
8
9
10
use std::os::fd::BorrowedFd;

pub type ImplType = BorrowedFd<'static>;

pub const unsafe fn from_u32_unchecked(x: u32) -> BorrowedFd<'static> {
    unsafe { core::mem::transmute(x) }
}
pub const fn to_u32(x: ImplType) -> u32 {
    unsafe { core::mem::transmute(x) }
}