The COMLibrary can not be created more than once (see ohadravid/wmi-rs#37).
Therefore, let's store the resulting WMIConnection as a singleton which would also improve performance, since the WMI connection needs to be created only once.
Additionally, I bumped the version of the wmi crate.
The
COMLibrary
can not be created more than once (see ohadravid/wmi-rs#37). Therefore, let's store the resultingWMIConnection
as a singleton which would also improve performance, since the WMI connection needs to be created only once.Additionally, I bumped the version of the
wmi
crate.