Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle multi-valued target_family #12

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wchar"
version = "0.11.0"
version = "0.11.1"
authors = ["Juici <[email protected]>"]
description = "Procedural macros for compile time UTF-16 and UTF-32 wide strings."
edition = "2018"
Expand Down
8 changes: 4 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ impl Cfg {
}

fn unix(&self) -> bool {
self.family() == Some(family::unix)
self.family().any(|family| family::unix == family)
}

fn windows(&self) -> bool {
self.family() == Some(family::windows)
self.family().any(|family| family::windows == family)
}

fn family(&self) -> Option<&str> {
self.cfg("target_family")
fn family(&self) -> impl Iterator<Item = &str> {
self.cfg("target_family").unwrap_or_default().split(',')
}

fn os(&self) -> Option<&str> {
Expand Down