@@ -83,30 +83,30 @@ impl Builder {
83
83
}
84
84
85
85
/// Set the size of the display. Supported sizes are defined by [DisplaySize].
86
- pub fn size ( & self , display_size : DisplaySize ) -> Self {
86
+ pub fn size ( self , display_size : DisplaySize ) -> Self {
87
87
Self {
88
88
display_size,
89
- ..* self
89
+ ..self
90
90
}
91
91
}
92
92
93
93
/// Set the I2C address to use. Defaults to 0x3C which is the most common address.
94
94
/// The other address specified in the datasheet is 0x3D. Ignored when using SPI interface.
95
- pub fn with_i2c_addr ( & self , i2c_addr : u8 ) -> Self {
96
- Self { i2c_addr, ..* self }
95
+ pub fn with_i2c_addr ( self , i2c_addr : u8 ) -> Self {
96
+ Self { i2c_addr, ..self }
97
97
}
98
98
99
99
/// Set the rotation of the display to one of four values. Defaults to no rotation. Note that
100
100
/// 90º and 270º rotations are not supported by
101
101
/// [`TerminalMode`](../mode/terminal/struct.TerminalMode.html).
102
- pub fn with_rotation ( & self , rotation : DisplayRotation ) -> Self {
103
- Self { rotation, ..* self }
102
+ pub fn with_rotation ( self , rotation : DisplayRotation ) -> Self {
103
+ Self { rotation, ..self }
104
104
}
105
105
106
106
/// Finish the builder and use I2C to communicate with the display
107
107
///
108
108
/// This method consumes the builder and must come last in the method call chain
109
- pub fn connect_i2c < I2C , CommE > ( & self , i2c : I2C ) -> DisplayMode < RawMode < I2cInterface < I2C > > >
109
+ pub fn connect_i2c < I2C , CommE > ( self , i2c : I2C ) -> DisplayMode < RawMode < I2cInterface < I2C > > >
110
110
where
111
111
I2C : hal:: blocking:: i2c:: Write < Error = CommE > ,
112
112
{
@@ -122,7 +122,7 @@ impl Builder {
122
122
///
123
123
/// This method consumes the builder and must come last in the method call chain
124
124
pub fn connect_spi < SPI , DC , CommE , PinE > (
125
- & self ,
125
+ self ,
126
126
spi : SPI ,
127
127
dc : DC ,
128
128
) -> DisplayMode < RawMode < SpiInterface < SPI , DC > > >
0 commit comments