diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-08-25 22:20:21 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-08-25 22:20:21 +0200 |
commit | 64a5029c647e37f406c47c365d83d110136be7ca (patch) | |
tree | f6c975b726a28233bf18c8d652579b04f4576ba1 /askama_shared/src | |
parent | ecafb9b10aa878f2598fd3a4a1deab62ffec40b8 (diff) | |
download | askama-64a5029c647e37f406c47c365d83d110136be7ca.tar.gz askama-64a5029c647e37f406c47c365d83d110136be7ca.tar.bz2 askama-64a5029c647e37f406c47c365d83d110136be7ca.zip |
Use unstable sort for size median calculation
Diffstat (limited to 'askama_shared/src')
-rw-r--r-- | askama_shared/src/generator.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs index 655cdd9..a82714b 100644 --- a/askama_shared/src/generator.rs +++ b/askama_shared/src/generator.rs @@ -1482,7 +1482,7 @@ where } fn median(sizes: &mut [usize]) -> usize { - sizes.sort(); + sizes.sort_unstable(); if sizes.len() % 2 == 1 { sizes[sizes.len() / 2] } else { |