sort order api list asc

This commit is contained in:
postscriptum 2026-03-23 09:07:56 +02:00
parent 8586a5b036
commit 6bfe60283e

View file

@ -104,11 +104,14 @@ impl List {
} }
/// Return active rules (from server memory) /// Return active rules (from server memory)
pub async fn list(&self) -> Vec<String> { pub async fn list(&self) -> Vec<String> {
self.index let mut list: Vec<String> = self
.index
.read() .read()
.await .await
.iter() .iter()
.map(|item| item.to_string()) .map(|item| item.to_string())
.collect() .collect();
list.sort(); // HashSet does not keep the order
list
} }
} }