Skip to content

Commit

Permalink
Handle multi-valued target_family (#12)
Browse files Browse the repository at this point in the history
* Handle multi-valued `target_family`

* Bump patch version
  • Loading branch information
madsmtm authored Jun 28, 2024
1 parent 4bd0b10 commit ed403de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit ed403de

Please sign in to comment.