File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change 1
- use std:: iter:: MultiplicativeIterator ;
2
1
use std:: io:: prelude:: * ;
3
2
use byteorder:: { ReadBytesExt , WriteBytesExt , BigEndian } ;
4
3
@@ -28,7 +27,7 @@ impl<T> FromSql for ArrayBase<Option<T>> where T: FromSql {
28
27
let nele = if dim_info. len ( ) == 0 {
29
28
0
30
29
} else {
31
- dim_info. iter ( ) . map ( | info| info. len ) . product ( )
30
+ dim_info. iter ( ) . fold ( 1 , |product , info| product * info. len )
32
31
} ;
33
32
34
33
let mut elements = Vec :: with_capacity ( nele) ;
Original file line number Diff line number Diff line change 1
1
//! Multi-dimensional arrays with per-dimension specifiable lower bounds
2
2
#![ doc( html_root_url="https://sfackler.github.io/rust-postgres-array/doc" ) ]
3
- #![ feature( core) ]
4
3
5
4
#[ macro_use( to_sql_checked) ]
6
5
extern crate postgres;
You can’t perform that action at this time.
0 commit comments