Macchina-CLI / libmacchina

A library providing access to all sorts of system information.
https://crates.io/crates/libmacchina
MIT License
68 stars 20 forks source link

Use a singleton for `COMLibrary` to fix issue #139 #143

Closed FantasyTeddy closed 1 year ago

FantasyTeddy commented 1 year ago

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.

grtcdr commented 1 year ago

Thanks a lot, Matthias. Your help is, as always, really appreciated!

FantasyTeddy commented 1 year ago

Glad I can help :)