use crate::{
bindings,
- str::CString,
+ str::CStr,
types::{ARef, Opaque},
};
use core::{fmt, ptr};
}
/// Checks if property is present or not.
- pub fn property_present(&self, name: &CString) -> bool {
- // SAFETY: By the invariant of `CString`, `name` is null-terminated.
+ pub fn property_present(&self, name: &CStr) -> bool {
+ // SAFETY: By the invariant of `CStr`, `name` is null-terminated.
unsafe { bindings::device_property_present(self.as_raw().cast_const(), name.as_ptr() as *const _) }
}
}