Use BTreeSet instead of HashSet

This commit is contained in:
Clémentine Urquizar 2021-06-16 16:18:55 +02:00
parent 7b02fdaddc
commit dc5a3d4a62
No known key found for this signature in database
GPG key ID: D8E7CC7422E77E1A
2 changed files with 21 additions and 32 deletions

View file

@ -1,4 +1,4 @@
use std::collections::HashSet;
use std::collections::{BTreeSet, HashSet};
use std::convert::{TryFrom, TryInto};
use actix_web::{get, post, web, HttpResponse};
@ -36,7 +36,7 @@ impl TryFrom<SearchQueryGet> for SearchQuery {
fn try_from(other: SearchQueryGet) -> anyhow::Result<Self> {
let attributes_to_retrieve = other
.attributes_to_retrieve
.map(|attrs| attrs.split(',').map(String::from).collect::<HashSet<_>>());
.map(|attrs| attrs.split(',').map(String::from).collect::<BTreeSet<_>>());
let attributes_to_crop = other
.attributes_to_crop