input.rs icon indicating copy to clipboard operation
input.rs copied to clipboard

confusing `Safety` comment for `Device::udev_device`

Open m4rch3n1ng opened this issue 1 year ago • 0 comments

the Device::udev_device method has a safety comment saying you have to make sure that you pass in the same udev Context as the one that you used to create the libinput one.

https://github.com/Smithay/input.rs/blob/40b31d3a5ccdd7c45093b3ee64091f779d8f9bc4/src/device.rs#L351-L366

but that context hasn't been passed in since ea8e779d785f6ed82c77acd72f02de5c66d71793, so i wanted to know: does that function still need to be unsafe? if yes, what do i, as the caller, have to ensure so i don't cause undefined behaviour?

thanks

m4rch3n1ng avatar Oct 28 '24 09:10 m4rch3n1ng