udev: accept [u8] instead of str
This commit is contained in:
parent
ff177a0721
commit
37a0bd451b
2 changed files with 3 additions and 3 deletions
|
|
@ -280,8 +280,8 @@ pub async fn create(state: &Rc<State>) -> Result<Rc<MetalBackend>, MetalError> {
|
||||||
});
|
});
|
||||||
let udev = Rc::new(Udev::new()?);
|
let udev = Rc::new(Udev::new()?);
|
||||||
let monitor = Rc::new(udev.create_monitor()?);
|
let monitor = Rc::new(udev.create_monitor()?);
|
||||||
monitor.add_match_subsystem_devtype(Some("input"), None)?;
|
monitor.add_match_subsystem_devtype(Some(b"input"), None)?;
|
||||||
monitor.add_match_subsystem_devtype(Some("drm"), None)?;
|
monitor.add_match_subsystem_devtype(Some(b"drm"), None)?;
|
||||||
monitor.enable_receiving()?;
|
monitor.enable_receiving()?;
|
||||||
let libinput = Rc::new(LibInput::new(device_holder.clone())?);
|
let libinput = Rc::new(LibInput::new(device_holder.clone())?);
|
||||||
let monitor_fd = dup_fd(monitor.fd())?;
|
let monitor_fd = dup_fd(monitor.fd())?;
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ impl UdevMonitor {
|
||||||
|
|
||||||
pub fn add_match_subsystem_devtype(
|
pub fn add_match_subsystem_devtype(
|
||||||
&self,
|
&self,
|
||||||
subsystem: Option<&str>,
|
subsystem: Option<&[u8]>,
|
||||||
devtype: Option<&str>,
|
devtype: Option<&str>,
|
||||||
) -> Result<(), UdevError> {
|
) -> Result<(), UdevError> {
|
||||||
let subsystem = subsystem.map(|s| s.into_ustr());
|
let subsystem = subsystem.map(|s| s.into_ustr());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue