@@ -235,29 +235,37 @@ impl<T> Grid<T> {
235235 self . items . get_unchecked_mut ( ( x + y * width) as usize )
236236 }
237237
238- pub fn north_line ( & self , x : i32 ) -> LineIterator < T > {
238+ pub fn north_line < ' a > ( & ' a self , x : i32 ) -> LineIterator < ' a , T > {
239239 LineIterator :: North { grid : self , x, y : self . height ( ) - 1 }
240240 }
241241
242- pub fn east_line ( & self , y : i32 ) -> LineIterator < T > {
242+ pub fn east_line < ' a > ( & ' a self , y : i32 ) -> LineIterator < ' a , T > {
243243 LineIterator :: East { grid : self , x : 0 , y }
244244 }
245245
246- pub fn south_line ( & self , x : i32 ) -> LineIterator < T > {
246+ pub fn south_line < ' a > ( & ' a self , x : i32 ) -> LineIterator < ' a , T > {
247247 LineIterator :: South { grid : self , x, y : 0 }
248248 }
249249
250- pub fn west_line ( & self , y : i32 ) -> LineIterator < T > {
250+ pub fn west_line < ' a > ( & ' a self , y : i32 ) -> LineIterator < ' a , T > {
251251 LineIterator :: West { grid : self , x : self . width ( ) - 1 , y }
252252 }
253253
254- pub fn north_lines ( & self ) -> LinesIterator < T > { LinesIterator :: North { grid : self , x : 0 } }
254+ pub fn north_lines < ' a > ( & ' a self ) -> LinesIterator < ' a , T > {
255+ LinesIterator :: North { grid : self , x : 0 }
256+ }
255257
256- pub fn east_lines ( & self ) -> LinesIterator < T > { LinesIterator :: East { grid : self , y : 0 } }
258+ pub fn east_lines < ' a > ( & ' a self ) -> LinesIterator < ' a , T > {
259+ LinesIterator :: East { grid : self , y : 0 }
260+ }
257261
258- pub fn south_lines ( & self ) -> LinesIterator < T > { LinesIterator :: South { grid : self , x : 0 } }
262+ pub fn south_lines < ' a > ( & ' a self ) -> LinesIterator < ' a , T > {
263+ LinesIterator :: South { grid : self , x : 0 }
264+ }
259265
260- pub fn west_lines ( & self ) -> LinesIterator < T > { LinesIterator :: West { grid : self , y : 0 } }
266+ pub fn west_lines < ' a > ( & ' a self ) -> LinesIterator < ' a , T > {
267+ LinesIterator :: West { grid : self , y : 0 }
268+ }
261269
262270 pub fn mut_line < F > ( & mut self , start : Location , direction : Vector < 2 , i32 > , function : F )
263271 where
0 commit comments