Skip to content

Commit a3e97a2

Browse files
committed
Added from_parts_with_err method to Array
Signed-off-by: chandr-andr (Kiselev Aleksandr) <chandr@chandr.net>
1 parent cd286fa commit a3e97a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl<T> Array<T> {
8484
data: Vec<T>,
8585
dimensions: Vec<Dimension>,
8686
) -> Result<Array<T>, Error> {
87-
if !(data.is_empty() && dimensions.is_empty())
87+
if (!data.is_empty() && !dimensions.is_empty())
8888
|| data.len() as i32 != dimensions.iter().fold(1, |acc, i| acc * i.len)
8989
{
9090
return Err(Error::new(ErrorKind::Other, "size mismatch"));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy