nm: device: refactor create_index_for_nm_devs
Use &str instead of String to avoid cloning all the interface names and store the NmDevices as refs. This index is short lived so it's OK to restrict its lifetime to the original list of devices. Use InterfaceType instead of NmIfaceType in the index so the caller doesn't need to do the conversion. This function will be used in the next commit. Signed-off-by: Íñigo Huguet <ihuguet@riseup.net>
Í
Íñigo Huguet committed
9f5d0660de1a68a0e323c363cbf4ff78b0971401
Parent: f228c8c
Committed by Gris Ge <fge@redhat.com>
on 8/6/2025, 1:31:52 PM