We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20fc714 commit ec10dcbCopy full SHA for ec10dcb
src/lib.rs
@@ -185,7 +185,7 @@ impl I2cdev {
185
186
fn set_address(&mut self, address: u8) -> Result<(), i2cdev::linux::LinuxI2CError> {
187
if self.address != Some(address) {
188
- self.inner = i2cdev::linux::LinuxI2CDevice::new(&self.path, address as u16)?;
+ self.inner = i2cdev::linux::LinuxI2CDevice::new(&self.path, u16::from(address))?;
189
self.address = Some(address);
190
}
191
Ok(())
0 commit comments