]> git.proxmox.com Git - pve-installer.git/commit
tui: fix interface sort order
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 17 Nov 2023 17:30:23 +0000 (18:30 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 17 Nov 2023 18:31:26 +0000 (19:31 +0100)
commit8f0e9ab0f9e8ff1e661d94e91cf5c23406fd1e4b
tree9249761b2e4665142535453c27c65b3533584ea9
parent851a1e98b29ea208192307f44d463ed15053edb6
tui: fix interface sort order

Currently, when multiple NICs are present in a system the TUI
sometimes selects the wrong interface (not the one that has the
default gateway/dhcp lease)

I assume this is due to HashMap's values yielding an iterator in
arbitrary order

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
 [ TL: avoid intermediate vector, reuse the SelectView's iter()]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-tui-installer/src/main.rs