mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-28 16:18:57 +00:00
Preserve the median precondition from master
This commit is contained in:
1 parent
6af615c19f
commit
21bbcc5490
1 file changed
+4
@@ -47,6 +47,10 @@ where
|
||||
P: Into<Q>,
|
||||
{
|
||||
let mut values = values.into_iter().collect::<Vec<_>>();
|
||||
assert!(
|
||||
!values.is_empty(),
|
||||
"median requires at least one measurement"
|
||||
);
|
||||
values.sort_by(|a, b| a.partial_cmp(b).expect("No NaN values"));
|
||||
|
||||
let len = values.len();
|
||||
|
||||
Reference in new issue
Block a user