Skip to content

Commit ed11c53

Browse files
clippy
1 parent 61d9df5 commit ed11c53

File tree

6 files changed

+6
-14
lines changed

6 files changed

+6
-14
lines changed

src/driver/aip31068.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ where
2929
fn new(config: DeviceSetupConfig<I2C, DELAY>) -> Self {
3030
AIP31068 {
3131
buffer: [0; MAX_BUFFER_SIZE],
32-
config: config,
32+
config,
3333
}
3434
}
3535

src/driver/hd44780/adapter/adafruit_lcd_backpack.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ where
4343
fn new(config: DeviceSetupConfig<I2C, DELAY>) -> Self {
4444
Self {
4545
bits: AdafruitLCDBackpackBitField(0),
46-
config: config,
46+
config,
4747
_marker: PhantomData,
4848
}
4949
}

src/driver/hd44780/adapter/dual_controller_pcf8574t.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ where
4646
fn new(config: DeviceSetupConfig<I2C, DELAY>) -> Self {
4747
Self {
4848
bits: DualHD44780_PCF8574TBitField(0),
49-
config: config,
49+
config,
5050
_marker: PhantomData,
5151
}
5252
}

src/driver/hd44780/adapter/generic_pcf8574t.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ where
4646
fn new(config: DeviceSetupConfig<I2C, DELAY>) -> Self {
4747
Self {
4848
bits: GenericPCF8574TBitField(0),
49-
config: config,
49+
config,
5050
_marker: PhantomData,
5151
}
5252
}

src/driver/st7032i.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ where
4141
fn new(config: DeviceSetupConfig<I2C, DELAY>) -> Self {
4242
ST7032i {
4343
buffer: [0; MAX_BUFFER_SIZE],
44-
config: config,
44+
config,
4545
}
4646
}
4747

src/driver/standard.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,13 @@ pub const LCD_FLAG_5x8_DOTS: u8 = 0x00; // 8 pixel high font mode
4545
/// `StandardActionsHandler`` is a struct that implements the `DisplayActionsTrait` trait. Most of the
4646
/// character displays use a standard set of commands to control the display. This struct implements
4747
/// for those standard commands.
48+
#[derive(Default)]
4849
pub struct StandardCharacterDisplayHandler {
4950
display_function: u8,
5051
display_control: u8,
5152
display_mode: u8,
5253
}
5354

54-
impl Default for StandardCharacterDisplayHandler {
55-
fn default() -> Self {
56-
StandardCharacterDisplayHandler {
57-
display_function: 0,
58-
display_control: 0,
59-
display_mode: 0,
60-
}
61-
}
62-
}
6355

6456
impl StandardCharacterDisplayHandler {
6557
pub fn get_display_function(&self) -> u8 {

0 commit comments

Comments
 (0)