GuillaumeGomez / sysinfo

Cross-platform library to fetch system information
MIT License
2.17k stars 320 forks source link

Use std::env::consts::ARCH for System::cpu_arch #1356

Closed ayn2op closed 1 month ago

ayn2op commented 1 month ago

The std::env::consts::ARCH constant can be used instead of computing the value for every call to the function.

GuillaumeGomez commented 1 month ago

Interested into sending a PR?

ayn2op commented 1 month ago

Interested into sending a PR?

Should the function fallback to std::env::consts::ARCH if SystemInner::cpu_arch returns None?

GuillaumeGomez commented 1 month ago

Sounds good to me!