File tree Expand file tree Collapse file tree 2 files changed +16
-12
lines changed Expand file tree Collapse file tree 2 files changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,14 @@ where
27
27
{
28
28
/// Create new instance with only the I2C and delay instance.
29
29
pub fn new ( i2c : & ' a mut I , delay : & ' a mut D ) -> Self {
30
- assert ! ( ROWS > 0 , "ROWS needs to be larger than zero!" ) ;
31
- assert ! ( COLUMNS > 0 , "COLUMNS needs to be larger than zero!" ) ;
32
- assert ! (
33
- ROWS < 5 ,
34
- "This library only supports LCDs with up to four rows!"
35
- ) ; // Because we don't have offsets for more than four rows
30
+ const {
31
+ assert ! ( ROWS > 0 , "ROWS needs to be larger than zero!" ) ;
32
+ assert ! ( COLUMNS > 0 , "COLUMNS needs to be larger than zero!" ) ;
33
+ assert ! (
34
+ ROWS < 5 ,
35
+ "This library only supports LCDs with up to four rows!"
36
+ ) ; // Because we don't have offsets for more than four rows
37
+ } ;
36
38
Self {
37
39
i2c,
38
40
delay,
Original file line number Diff line number Diff line change @@ -30,12 +30,14 @@ where
30
30
{
31
31
/// Create new instance with only the I2C and delay instance.
32
32
pub fn new ( i2c : & ' a mut I , delay : & ' a mut D ) -> Self {
33
- assert ! ( ROWS > 0 , "ROWS needs to be larger than zero!" ) ;
34
- assert ! ( COLUMNS > 0 , "COLUMNS needs to be larger than zero!" ) ;
35
- assert ! (
36
- ROWS < 5 ,
37
- "This library only supports LCDs with up to four rows!"
38
- ) ; // Because we don't have offsets for more than four rows
33
+ const {
34
+ assert ! ( ROWS > 0 , "ROWS needs to be larger than zero!" ) ;
35
+ assert ! ( COLUMNS > 0 , "COLUMNS needs to be larger than zero!" ) ;
36
+ assert ! (
37
+ ROWS < 5 ,
38
+ "This library only supports LCDs with up to four rows!"
39
+ ) ; // Because we don't have offsets for more than four rows
40
+ } ;
39
41
Self {
40
42
i2c,
41
43
delay,
You can’t perform that action at this time.
0 commit comments