aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-08-25 22:20:21 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-08-25 22:20:21 +0200
commit64a5029c647e37f406c47c365d83d110136be7ca (patch)
treef6c975b726a28233bf18c8d652579b04f4576ba1 /askama_shared/src
parentecafb9b10aa878f2598fd3a4a1deab62ffec40b8 (diff)
downloadaskama-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.rs2
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 {