Skip to content

Commit

Permalink
Merge #105
Browse files Browse the repository at this point in the history
105: [ucd/normal] Add use-ucd-category feature r=CAD97

Basically, the dev dep record has been auto-enabling the optional dev
record for all test builds, resulting in the error to not surface.

Fix for the error surfacing by this change is
<#104>.

The original issue, which is (IMHO) unexpected Cargo behavior is filed
here: <rust-lang/cargo#4395>
  • Loading branch information
bors[bot] committed Aug 10, 2017
2 parents 04c96d7 + 8bc5cba commit 42db673
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion unic/ucd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ travis-ci = { repository = "behnam/rust-unic", branch = "master" }
unic-ucd-age = { path = "age/", version = "0.5.0" }
unic-ucd-bidi = { path = "bidi/", version = "0.5.0" }
unic-ucd-core = { path = "core/", version = "0.5.0" }
unic-ucd-normal = { path = "normal/", version = "0.5.0", features = ["unic-ucd-category"] }
unic-ucd-normal = { path = "normal/", version = "0.5.0", features = ["use-ucd-category"] }
unic-ucd-category = { path = "category/", version = "0.5.0" }

[dev-dependencies]
Expand Down
7 changes: 4 additions & 3 deletions unic/ucd/normal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ categories = ["text-processing", "parsing", "rendering"]
# No tests/benches that depends on /data/
exclude = ["tests/conformance_tests.rs"]

[features]
default = []

[badges]
travis-ci = { repository = "behnam/rust-unic", branch = "master" }

Expand All @@ -25,3 +22,7 @@ unic-utils = { path = "../../utils/", version = "0.5.0" }
[dev-dependencies]
unic-utils = { path = "../../utils", version = "0.5.0" }
unic-ucd-category = { path = "../category/", version = "0.5.0" }

[features]
default = []
use-ucd-category = ["unic-ucd-category"]
5 changes: 3 additions & 2 deletions unic/ucd/normal/src/gen_cat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[cfg(not(feature = "unic-ucd-category"))]
#[cfg(not(feature = "use-ucd-category"))]
mod mark {
use unic_utils::CharDataTable;

Expand All @@ -22,9 +22,10 @@ mod mark {
}
}

#[cfg(feature = "unic-ucd-category")]
#[cfg(feature = "use-ucd-category")]
mod mark {
extern crate unic_ucd_category;

use self::unic_ucd_category::GeneralCategory;

/// Return whether the given character is a combining mark (`General_Category=Mark`)
Expand Down

0 comments on commit 42db673

Please sign in to comment.