Skip to content

Commit

Permalink
add missing Debug derive
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Jun 24, 2024
1 parent 0b4cec1 commit fc6c8f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ pub struct Lis2dh12<I2C> {
}

/// Errors returned from the [detect_i2c_addr]
pub enum AddrDetectionError<I2cError> {
#[derive(Debug)]
pub enum AddrDetectionError<I2cError: Debug> {
/// Other I2C error trying to detect a device address.
I2c(I2cError),
/// Invalid device ID read from device.
InvalidDeviceId,
}

impl<I2cError> From<I2cError> for AddrDetectionError<I2cError> {
impl<I2cError: Debug> From<I2cError> for AddrDetectionError<I2cError> {
fn from(value: I2cError) -> Self {
AddrDetectionError::I2c(value)
}
Expand Down

0 comments on commit fc6c8f6

Please sign in to comment.