(m: &Matrix)
| 38 | } |
| 39 | |
| 40 | fn hash_matrix(m: &Matrix) -> String { |
| 41 | let mut h = DefaultHasher::new(); |
| 42 | m.nrow().hash(&mut h); |
| 43 | m.ncol().hash(&mut h); |
| 44 | // the layout enum has no Hash impl; use Debug as a stable surrogate |
| 45 | format!("{:?}", m.layout()).hash(&mut h); |
| 46 | for x in m.as_slice() { |
| 47 | x.to_bits().hash(&mut h); |
| 48 | } |
| 49 | format!("{:016x}", h.finish()) |
| 50 | } |
| 51 | |
| 52 | fn print_kv<T: std::fmt::Display>(label: &str, value: T) { |
| 53 | println!("{:48} {}", label, value); |
no test coverage detected