From 64a5029c647e37f406c47c365d83d110136be7ca Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 25 Aug 2020 22:20:21 +0200 Subject: Use unstable sort for size median calculation --- askama_shared/src/generator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'askama_shared/src/generator.rs') 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 { -- cgit