sys-info-rs
sys-info-rs copied to clipboard
unify all `LinuxOSReleaseInfo` id to lowercase
the documentation of that struct states the id as "A lower-case string", however, it is not a lowercase string on some distro such as openEuler
.
output of debug printing:
Ok(
LinuxOSReleaseInfo {
id: Some(
"openEuler",
),
id_like: None,
name: Some(
"openEuler",
),
pretty_name: Some(
"openEuler 20.03 (LTS-SP1)",
),
version: Some(
"20.03 (LTS-SP1)",
),
version_id: Some(
"20.03",
),
...
},
)
@J-ZhengLi Please feel free to open a PR to fix the doc.
@J-ZhengLi Please feel free to open a PR to fix the doc.
Sure :thinking: but before I do, I have a simple question. I know this might be a job for the OS provider, but what's the downside of converting the return string to lowercase here?
Emm, I don't think it's a good idea to add a convertion here. Maybe just let the return string be same to the real one from the OS provider.