From 78799f5926b3528af47e41b4a914e712ae833b6c Mon Sep 17 00:00:00 2001 From: 19atlas <67108558+19atlas@users.noreply.github.com> Date: Fri, 21 Jun 2024 22:33:51 +0000 Subject: [PATCH] update for android get error unwrap() --- src/resource.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/resource.rs b/src/resource.rs index bdab30a..5df6c4e 100644 --- a/src/resource.rs +++ b/src/resource.rs @@ -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();