feat: support for Android platform in the for qualifier of opener (#2041)

This commit is contained in:
三咲雅 · Misaki Masa 2024-12-14 08:50:36 +08:00 committed by GitHub
parent 196a46cc5e
commit c1048debc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,11 +13,9 @@ pub struct Opener {
impl Opener {
pub fn take(mut self) -> Option<Self> {
if let Some(for_) = self.for_.take() {
match for_.as_bytes() {
b"unix" if cfg!(unix) => {}
b"windows" if cfg!(windows) => {}
b"linux" if cfg!(target_os = "linux") => {}
b"macos" if cfg!(target_os = "macos") => {}
match for_.as_str() {
"unix" if cfg!(unix) => {}
os if os == std::env::consts::OS => {}
_ => return None,
}
}