Fix wrong usage of ini function

This commit is contained in:
Roey Darwish Dror
2019-05-16 15:37:35 +03:00
parent 763e8b84eb
commit d17be8cf56

View File

@@ -31,7 +31,7 @@ pub enum Distribution {
impl Distribution {
fn parse_os_release(os_release: &ini::Ini) -> Result<Self, Error> {
let section = os_release.section::<&str>(None).unwrap();
let section = os_release.general_section();
let id = section.get("ID").map(String::as_str);
let id_like = section.get("ID_LIKE").map(String::as_str);
Ok(match (id, id_like) {