summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/utils.rs
blob: efbbe81aa9092aa7a90aa1e34f21e984d95a5037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/// Convert a `&T` into a `*const T` without using an `as`.
#[inline]
#[allow(dead_code)]
pub(crate) const fn as_ptr<T>(t: &T) -> *const T {
    t
}

/// Convert a `&mut T` into a `*mut T` without using an `as`.
#[inline]
#[allow(dead_code)]
pub(crate) fn as_mut_ptr<T>(t: &mut T) -> *mut T {
    t
}