File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1010//! Additional functions, tests and filters used in templates
1111
1212use std:: {
13- collections:: HashMap ,
13+ collections:: { BTreeMap , HashMap } ,
1414 fmt:: Formatter ,
1515 str:: FromStr ,
1616 sync:: { Arc , atomic:: AtomicUsize } ,
@@ -182,7 +182,8 @@ fn function_add_params_to_url(
182182 . unwrap_or_default ( ) ;
183183
184184 // Merge the exising and the additional parameters together
185- let params: HashMap < & String , & Value > = params. iter ( ) . chain ( existing. iter ( ) ) . collect ( ) ;
185+ // Use a BTreeMap for determinism (because it orders keys)
186+ let params: BTreeMap < & String , & Value > = params. iter ( ) . chain ( existing. iter ( ) ) . collect ( ) ;
186187
187188 // Transform them back to urlencoded
188189 let params = serde_urlencoded:: to_string ( params) . map_err ( |e| {
You can’t perform that action at this time.
0 commit comments