mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2025-12-29 08:46:54 +00:00
gpio: silence (valid) clippy warning for now
This is a valid issue, but resolving takes some time. Meanwhile, we do not want to block the CI. Issue #442 was filed to track finding a real fix. This should be reverted once the real fix happens. Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
This commit is contained in:
parent
5f1c19d9e5
commit
313ca7c0f2
@ -219,11 +219,22 @@ impl GpioDevice for PhysDevice {
|
||||
.set_consumer("vhu-gpio")
|
||||
.map_err(Error::GpiodFailed)?;
|
||||
|
||||
state.request = Some(Arc::new(Mutex::new(
|
||||
self.chip
|
||||
.request_lines(Some(&rconfig), &lconfig)
|
||||
.map_err(Error::GpiodFailed)?,
|
||||
)));
|
||||
// This is causing a warning since libgpiod's request_config is
|
||||
// not `Send`.
|
||||
// We, however, unsafely claim that it is by marking PhysDevice as
|
||||
// `Send`. This is wrong, but until we figure out what to do, we
|
||||
// just silence the clippy warning here.
|
||||
//
|
||||
// https://github.com/rust-vmm/vhost-device/issues/442 tracks
|
||||
// finding a solution to this.
|
||||
#[allow(clippy::arc_with_non_send_sync)]
|
||||
{
|
||||
state.request = Some(Arc::new(Mutex::new(
|
||||
self.chip
|
||||
.request_lines(Some(&rconfig), &lconfig)
|
||||
.map_err(Error::GpiodFailed)?,
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user