@@ -272,16 +272,16 @@ impl DirExt {
272272 }
273273
274274 /// Move one step in this direction (unbounded, may underflow)
275- pub fn inext ( & self , p : Point ) -> Point {
275+ pub fn inext ( & self , p : IPoint ) -> IPoint {
276276 match self {
277- DirExt :: Up => Point ( p. 0 - 1 , p. 1 ) ,
278- DirExt :: UpLeft => Point ( p. 0 - 1 , p. 1 - 1 ) ,
279- DirExt :: UpRight => Point ( p. 0 - 1 , p. 1 + 1 ) ,
280- DirExt :: Down => Point ( p. 0 + 1 , p. 1 ) ,
281- DirExt :: DownLeft => Point ( p. 0 + 1 , p. 1 - 1 ) ,
282- DirExt :: DownRight => Point ( p. 0 + 1 , p. 1 + 1 ) ,
283- DirExt :: Left => Point ( p. 0 , p. 1 - 1 ) ,
284- DirExt :: Right => Point ( p. 0 , p. 1 + 1 ) ,
277+ DirExt :: Up => IPoint ( p. 0 - 1 , p. 1 ) ,
278+ DirExt :: UpLeft => IPoint ( p. 0 - 1 , p. 1 - 1 ) ,
279+ DirExt :: UpRight => IPoint ( p. 0 - 1 , p. 1 + 1 ) ,
280+ DirExt :: Down => IPoint ( p. 0 + 1 , p. 1 ) ,
281+ DirExt :: DownLeft => IPoint ( p. 0 + 1 , p. 1 - 1 ) ,
282+ DirExt :: DownRight => IPoint ( p. 0 + 1 , p. 1 + 1 ) ,
283+ DirExt :: Left => IPoint ( p. 0 , p. 1 - 1 ) ,
284+ DirExt :: Right => IPoint ( p. 0 , p. 1 + 1 ) ,
285285 }
286286 }
287287}
@@ -528,12 +528,12 @@ mod test {
528528
529529 #[ test]
530530 fn test_dir_inext ( ) {
531- let point = Point ( 2 , 2 ) ;
531+ let point = IPoint ( 2 , 2 ) ;
532532
533- assert_eq ! ( Dir :: Up . inext( point) , Point ( 1 , 2 ) ) ;
534- assert_eq ! ( Dir :: Down . inext( point) , Point ( 3 , 2 ) ) ;
535- assert_eq ! ( Dir :: Left . inext( point) , Point ( 2 , 1 ) ) ;
536- assert_eq ! ( Dir :: Right . inext( point) , Point ( 2 , 3 ) ) ;
533+ assert_eq ! ( Dir :: Up . inext( point) , IPoint ( 1 , 2 ) ) ;
534+ assert_eq ! ( Dir :: Down . inext( point) , IPoint ( 3 , 2 ) ) ;
535+ assert_eq ! ( Dir :: Left . inext( point) , IPoint ( 2 , 1 ) ) ;
536+ assert_eq ! ( Dir :: Right . inext( point) , IPoint ( 2 , 3 ) ) ;
537537 }
538538
539539 #[ test]
0 commit comments