rustyhorde / vergen

Generate cargo instructions at compile time in build scripts for use with the env! or option_env! macros
Apache License 2.0
370 stars 55 forks source link

Do not collect disks with `si` #267

Closed akoptelov closed 7 months ago

akoptelov commented 9 months ago

I didn't find anything that might be missing if System::new() is used instead of System::new_all().

See new() vs new_all()

Fix: #266

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e297324) 97.76% compared to head (6fb932a) 97.94%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #267 +/- ## ========================================== + Coverage 97.76% 97.94% +0.18% ========================================== Files 24 24 Lines 1609 1609 ========================================== + Hits 1573 1576 +3 + Misses 36 33 -3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

CraZySacX commented 7 months ago

I like this idea, but I think we need to make it configurable. Using new() by itself on the latest version of sysinfo shouldn't query the disks anymore. There is a new Disks interface that takes care of that which currently isn't being used.

I'll create a PR from this one and make the refresh configurable to make this feature more flexible.

CraZySacX commented 7 months ago

This has been implemented.

akoptelov commented 7 months ago

I'll create a PR from this one and make the refresh configurable to make this feature more flexible.

Great, thanks!