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
2727{
2828 /// Create new instance with only the I2C and delay instance.
2929 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+ } ;
3638 Self {
3739 i2c,
3840 delay,
Original file line number Diff line number Diff line change @@ -30,12 +30,14 @@ where
3030{
3131 /// Create new instance with only the I2C and delay instance.
3232 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+ } ;
3941 Self {
4042 i2c,
4143 delay,
You can’t perform that action at this time.
0 commit comments