diff --git a/src/device.rs b/src/device.rs index 0f29bfb..781ab02 100644 --- a/src/device.rs +++ b/src/device.rs @@ -38,7 +38,7 @@ pub struct Device { sub_type: u16, device_protocol_version: u8, - updates: Vec) -> Result<()>>>, + updates: Vec) -> Result<()> + Send + Sync>>, token: [u8; 64], key: [u8; 32], @@ -153,7 +153,7 @@ impl Device { pub fn register_update(mut self, f: F) -> Self where - F: Fn(&HashMap<&'static str, AttributeValue>) -> Result<()> + 'static, + F: Fn(&HashMap<&'static str, AttributeValue>) -> Result<()> + Send + Sync + 'static, { self.updates.push(Box::new(f));