diff --git a/martin/src/source.rs b/martin/src/source.rs index f78d69d9d..2c0e246e1 100644 --- a/martin/src/source.rs +++ b/martin/src/source.rs @@ -3,7 +3,6 @@ use std::fmt::Debug; use actix_web::error::ErrorNotFound; use async_trait::async_trait; -use itertools::Itertools; use log::debug; use martin_tile_utils::TileInfo; use serde::{Deserialize, Serialize}; @@ -38,7 +37,6 @@ impl TileSources { self.0 .iter() .map(|(id, src)| (id.to_string(), src.get_catalog_entry())) - .sorted_by(|(id1, _), (id2, _)| id1.cmp(id2)) .collect() } diff --git a/martin/src/sprites/mod.rs b/martin/src/sprites/mod.rs index ac2b3f4a3..dc205d6c4 100644 --- a/martin/src/sprites/mod.rs +++ b/martin/src/sprites/mod.rs @@ -4,7 +4,6 @@ use std::fmt::Debug; use std::path::PathBuf; use futures::future::try_join_all; -use itertools::Itertools; use log::{info, warn}; use serde::{Deserialize, Serialize}; use spreet::fs::get_svg_input_paths; @@ -93,7 +92,6 @@ impl SpriteSources { Ok(self .0 .iter() - .sorted_by(|(id1, _), (id2, _)| id1.cmp(id2)) .map(|(id, source)| { let mut images = get_svg_input_paths(&source.path, true) .into_iter() diff --git a/martin/src/utils/utilities.rs b/martin/src/utils/utilities.rs index e3a83f352..a8eab5b21 100644 --- a/martin/src/utils/utilities.rs +++ b/martin/src/utils/utilities.rs @@ -18,9 +18,7 @@ pub fn sorted_opt_map( } pub fn sorted_btree_map(value: &HashMap) -> BTreeMap<&K, &V> { - let mut items: Vec<(_, _)> = value.iter().collect(); - items.sort_by(|a, b| a.0.cmp(b.0)); - BTreeMap::from_iter(items) + value.iter().collect() } #[cfg(test)]