Skip to content

Commit

Permalink
update for android
Browse files Browse the repository at this point in the history
get error unwrap()
  • Loading branch information
19atlas authored Jun 21, 2024
1 parent fb0830b commit 78799f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ pub mod sys {
version
}

#[cfg(any(target_os = "linux", target_os = "android", target_os = "freebsd"))]
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
pub fn get_unix_distro(file: &str) -> String {
use std::fs;
let os_release = fs::read_to_string(file).unwrap();
let os_release: Vec<&str> = os_release.split('\n').collect();
#[cfg(any(target_os = "linux", target_os = "android"))]
#[cfg(target_os = "linux")]
let mut linux_distro = "GNU/Linux".to_string();
#[cfg(target_os = "freebsd")]
let mut linux_distro = "BSD".to_string();
Expand Down

0 comments on commit 78799f5

Please # to comment.