Skip to content

Commit 3835133

Browse files
Cheong-Lauwash2
authored andcommitted
fix (network): reversed order of WAPs
Don't use `sort_by_key` when wanting a descending order search...
1 parent 5369b4e commit 3835133

File tree

1 file changed

+1
-1
lines changed
  • cosmic-applet-network/src/network_manager

1 file changed

+1
-1
lines changed

cosmic-applet-network/src/network_manager/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ impl NetworkManagerState {
631631
})
632632
.cloned()
633633
.collect();
634-
wireless_access_points.sort_by_key(|ap| ap.strength);
634+
wireless_access_points.sort_by(|a, b| b.strength.cmp(&a.strength));
635635
self_.wireless_access_points = wireless_access_points;
636636
for ap in &self_.wireless_access_points {
637637
tracing::info!(

0 commit comments

Comments
 (0)