@@ -260,7 +260,7 @@ impl<T> CscMatrix<T> {
260
260
/// let triplets: Vec<_> = csc.triplet_iter().map(|(i, j, v)| (i, j, *v)).collect();
261
261
/// assert_eq!(triplets, vec![(0, 0, 1), (2, 0, 3), (1, 1, 2), (0, 2, 4)]);
262
262
/// ```
263
- pub fn triplet_iter ( & self ) -> CscTripletIter < T > {
263
+ pub fn triplet_iter ( & self ) -> CscTripletIter < ' _ , T > {
264
264
CscTripletIter {
265
265
pattern_iter : self . pattern ( ) . entries ( ) ,
266
266
values_iter : self . values ( ) . iter ( ) ,
@@ -290,7 +290,7 @@ impl<T> CscMatrix<T> {
290
290
/// let triplets: Vec<_> = csc.triplet_iter().map(|(i, j, v)| (i, j, *v)).collect();
291
291
/// assert_eq!(triplets, vec![(0, 0, 1), (2, 0, 0), (1, 1, 2), (0, 2, 4)]);
292
292
/// ```
293
- pub fn triplet_iter_mut ( & mut self ) -> CscTripletIterMut < T > {
293
+ pub fn triplet_iter_mut ( & mut self ) -> CscTripletIterMut < ' _ , T > {
294
294
let ( pattern, values) = self . cs . pattern_and_values_mut ( ) ;
295
295
CscTripletIterMut {
296
296
pattern_iter : pattern. entries ( ) ,
@@ -305,7 +305,7 @@ impl<T> CscMatrix<T> {
305
305
/// Panics if column index is out of bounds.
306
306
#[ inline]
307
307
#[ must_use]
308
- pub fn col ( & self , index : usize ) -> CscCol < T > {
308
+ pub fn col ( & self , index : usize ) -> CscCol < ' _ , T > {
309
309
self . get_col ( index) . expect ( "Row index must be in bounds" )
310
310
}
311
311
@@ -315,34 +315,34 @@ impl<T> CscMatrix<T> {
315
315
/// ------
316
316
/// Panics if column index is out of bounds.
317
317
#[ inline]
318
- pub fn col_mut ( & mut self , index : usize ) -> CscColMut < T > {
318
+ pub fn col_mut ( & mut self , index : usize ) -> CscColMut < ' _ , T > {
319
319
self . get_col_mut ( index)
320
320
. expect ( "Row index must be in bounds" )
321
321
}
322
322
323
323
/// Return the column at the given column index, or `None` if out of bounds.
324
324
#[ inline]
325
325
#[ must_use]
326
- pub fn get_col ( & self , index : usize ) -> Option < CscCol < T > > {
326
+ pub fn get_col ( & self , index : usize ) -> Option < CscCol < ' _ , T > > {
327
327
self . cs . get_lane ( index) . map ( |lane| CscCol { lane } )
328
328
}
329
329
330
330
/// Mutable column access for the given column index, or `None` if out of bounds.
331
331
#[ inline]
332
332
#[ must_use]
333
- pub fn get_col_mut ( & mut self , index : usize ) -> Option < CscColMut < T > > {
333
+ pub fn get_col_mut ( & mut self , index : usize ) -> Option < CscColMut < ' _ , T > > {
334
334
self . cs . get_lane_mut ( index) . map ( |lane| CscColMut { lane } )
335
335
}
336
336
337
337
/// An iterator over columns in the matrix.
338
- pub fn col_iter ( & self ) -> CscColIter < T > {
338
+ pub fn col_iter ( & self ) -> CscColIter < ' _ , T > {
339
339
CscColIter {
340
340
lane_iter : CsLaneIter :: new ( self . pattern ( ) , self . values ( ) ) ,
341
341
}
342
342
}
343
343
344
344
/// A mutable iterator over columns in the matrix.
345
- pub fn col_iter_mut ( & mut self ) -> CscColIterMut < T > {
345
+ pub fn col_iter_mut ( & mut self ) -> CscColIterMut < ' _ , T > {
346
346
let ( pattern, values) = self . cs . pattern_and_values_mut ( ) ;
347
347
CscColIterMut {
348
348
lane_iter : CsLaneIterMut :: new ( pattern, values) ,
@@ -408,7 +408,7 @@ impl<T> CscMatrix<T> {
408
408
/// Each call to this function incurs the cost of a binary search among the explicitly
409
409
/// stored row entries for the given column.
410
410
#[ must_use]
411
- pub fn get_entry ( & self , row_index : usize , col_index : usize ) -> Option < SparseEntry < T > > {
411
+ pub fn get_entry ( & self , row_index : usize , col_index : usize ) -> Option < SparseEntry < ' _ , T > > {
412
412
self . cs . get_entry ( col_index, row_index)
413
413
}
414
414
@@ -421,7 +421,7 @@ impl<T> CscMatrix<T> {
421
421
& mut self ,
422
422
row_index : usize ,
423
423
col_index : usize ,
424
- ) -> Option < SparseEntryMut < T > > {
424
+ ) -> Option < SparseEntryMut < ' _ , T > > {
425
425
self . cs . get_entry_mut ( col_index, row_index)
426
426
}
427
427
@@ -434,7 +434,7 @@ impl<T> CscMatrix<T> {
434
434
/// ------
435
435
/// Panics if `row_index` or `col_index` is out of bounds.
436
436
#[ must_use]
437
- pub fn index_entry ( & self , row_index : usize , col_index : usize ) -> SparseEntry < T > {
437
+ pub fn index_entry ( & self , row_index : usize , col_index : usize ) -> SparseEntry < ' _ , T > {
438
438
self . get_entry ( row_index, col_index)
439
439
. expect ( "Out of bounds matrix indices encountered" )
440
440
}
@@ -447,7 +447,7 @@ impl<T> CscMatrix<T> {
447
447
/// Panics
448
448
/// ------
449
449
/// Panics if `row_index` or `col_index` is out of bounds.
450
- pub fn index_entry_mut ( & mut self , row_index : usize , col_index : usize ) -> SparseEntryMut < T > {
450
+ pub fn index_entry_mut ( & mut self , row_index : usize , col_index : usize ) -> SparseEntryMut < ' _ , T > {
451
451
self . get_entry_mut ( row_index, col_index)
452
452
. expect ( "Out of bounds matrix indices encountered" )
453
453
}
@@ -666,7 +666,7 @@ macro_rules! impl_csc_col_common_methods {
666
666
/// Each call to this function incurs the cost of a binary search among the explicitly
667
667
/// stored row entries.
668
668
#[ must_use]
669
- pub fn get_entry( & self , global_row_index: usize ) -> Option <SparseEntry <T >> {
669
+ pub fn get_entry( & self , global_row_index: usize ) -> Option <SparseEntry <' _ , T >> {
670
670
self . lane. get_entry( global_row_index)
671
671
}
672
672
}
@@ -693,7 +693,7 @@ impl<'a, T> CscColMut<'a, T> {
693
693
694
694
/// Returns a mutable entry for the given global row index.
695
695
#[ must_use]
696
- pub fn get_entry_mut ( & mut self , global_row_index : usize ) -> Option < SparseEntryMut < T > > {
696
+ pub fn get_entry_mut ( & mut self , global_row_index : usize ) -> Option < SparseEntryMut < ' _ , T > > {
697
697
self . lane . get_entry_mut ( global_row_index)
698
698
}
699
699
}
0 commit comments