mirror of
https://codeberg.org/YGGverse/psocks.git
synced 2026-03-31 16:35:28 +00:00
sort order api list asc
This commit is contained in:
parent
8586a5b036
commit
6bfe60283e
1 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue