File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed
Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ trait Render: Train + Copy {
1616 let mut len = 0 as i32 ;
1717 let y = ncurses:: LINES / 2 ;
1818 let body_iter = self . body ( ) . iter ( ) ;
19- let wheelset_iter = self . wheelset ( x as u32 ) . iter ( ) ;
19+ let wheelset_iter = self . wheelset ( x as usize ) . iter ( ) ;
2020 let iter = body_iter. chain ( wheelset_iter) ;
2121 let ( _, hint) = iter. size_hint ( ) ;
2222 let height = match hint {
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ impl Train for C51 {
99 & C51BODY
1010 }
1111
12- fn wheelset ( & self , x : u32 ) -> & ' static [ & ' static str ] {
13- & C51WHL [ ( x % 6 ) as usize ]
12+ fn wheelset ( & self , x : usize ) -> & ' static [ & ' static str ] {
13+ & C51WHL [ ( x % 6 ) ]
1414 }
1515
1616 fn tender ( & self ) -> Option < & ' static [ & ' static str ] > {
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ impl Train for SL {
99 & D51BODY
1010 }
1111
12- fn wheelset ( & self , x : u32 ) -> & ' static [ & ' static str ] {
13- & D51WHL [ ( x % 6 ) as usize ]
12+ fn wheelset ( & self , x : usize ) -> & ' static [ & ' static str ] {
13+ & D51WHL [ ( x % 6 ) ]
1414 }
1515
1616 fn tender ( & self ) -> Option < & ' static [ & ' static str ] > {
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ impl Train for Logo {
99 & LOGO
1010 }
1111
12- fn wheelset ( & self , x : u32 ) -> & ' static [ & ' static str ] {
13- & LWHL [ ( x % 6 ) as usize ]
12+ fn wheelset ( & self , x : usize ) -> & ' static [ & ' static str ] {
13+ & LWHL [ ( x % 6 ) ]
1414 }
1515
1616 fn tender ( & self ) -> Option < & ' static [ & ' static str ] > {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ mod data;
55
66pub trait Train {
77 fn body ( & self ) -> & ' static [ & ' static str ] ;
8- fn wheelset ( & self , x : u32 ) -> & ' static [ & ' static str ] ;
8+ fn wheelset ( & self , x : usize ) -> & ' static [ & ' static str ] ;
99 fn tender ( & self ) -> Option < & ' static [ & ' static str ] > {
1010 None
1111 }
You can’t perform that action at this time.
0 commit comments