diff --git a/.appveyor.yml b/.appveyor.yml index 01796a6..1ba8953 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -31,13 +31,17 @@ before_test: - C:\msys64\usr\bin\bash -c "if [ -d ""$USERPROFILE/.cargo/registry/cache"" ]; then cd ""$USERPROFILE/.cargo/registry""; /c/msys64/usr/bin/find cache -name \*.crate; fi" test_script: - - cargo +beta-%TARGET% clippy --all-targets --features "fail-on-warnings f16 serde" - - cargo +beta-%TARGET% check --all-targets --features "fail-on-warnings serde" + - cargo +beta-%TARGET% clippy --all-targets --features "fail-on-warnings az f16 serde" + - cargo +beta-%TARGET% check --all-targets --features "fail-on-warnings az f16" + - cargo +beta-%TARGET% check --all-targets --features "fail-on-warnings az serde" + - cargo +beta-%TARGET% check --all-targets --features "fail-on-warnings f16 serde" + - cargo +beta-%TARGET% check --all-targets --features "fail-on-warnings az" - cargo +beta-%TARGET% check --all-targets --features "fail-on-warnings f16" + - cargo +beta-%TARGET% check --all-targets --features "fail-on-warnings serde" - cargo +beta-%TARGET% check --all-targets --features fail-on-warnings - - cargo +beta-%TARGET% test --release --features "fail-on-warnings f16 serde" + - cargo +beta-%TARGET% test --release --features "fail-on-warnings az f16 serde" - cargo +beta-%TARGET% fmt -- --check - - cargo +1.34.2-%TARGET% test --lib --features "fail-on-warnings f16 serde" + - cargo +1.34.2-%TARGET% test --lib --features "fail-on-warnings az f16 serde" after_test: - C:\msys64\usr\bin\bash -c "if [ -d ""$USERPROFILE/.cargo/registry/cache"" ]; then cd ""$USERPROFILE/.cargo/registry""; /c/msys64/usr/bin/find cache -name \*.crate; fi" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8a93835..059ba8f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,15 +28,19 @@ x86_64-gnulinux: paths: - cargo/ script: - - cargo +beta-$TARGET clippy --all-targets --features "fail-on-warnings f16 serde" - - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings serde" + - cargo +beta-$TARGET clippy --all-targets --features "fail-on-warnings az f16 serde" + - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings az f16" + - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings az serde" + - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings f16 serde" + - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings az" - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings f16" + - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings serde" - cargo +beta-$TARGET check --all-targets --features fail-on-warnings - - cargo +beta-$TARGET test --features "fail-on-warnings f16 serde" - - cargo +beta-$TARGET test --release --features "fail-on-warnings f16 serde" + - cargo +beta-$TARGET test --features "fail-on-warnings az f16 serde" + - cargo +beta-$TARGET test --release --features "fail-on-warnings az f16 serde" - cargo +beta-$TARGET fmt -- --check - - cargo +1.34.2-$TARGET test --lib --features "fail-on-warnings f16 serde" - - cargo +1.34.2-$TARGET test --release --lib --features "fail-on-warnings f16 serde" + - cargo +1.34.2-$TARGET test --lib --features "fail-on-warnings az f16 serde" + - cargo +1.34.2-$TARGET test --release --lib --features "fail-on-warnings az f16 serde" i686-gnulinux: image: i386/rust:1 @@ -47,12 +51,16 @@ i686-gnulinux: paths: - cargo/ script: - - cargo +beta-$TARGET clippy --all-targets --features "fail-on-warnings f16 serde" - - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings serde" + - cargo +beta-$TARGET clippy --all-targets --features "fail-on-warnings az f16 serde" + - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings az f16" + - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings az serde" + - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings f16 serde" + - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings az" - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings f16" + - cargo +beta-$TARGET check --all-targets --features "fail-on-warnings serde" - cargo +beta-$TARGET check --all-targets --features fail-on-warnings - cargo +beta-$TARGET test --features "fail-on-warnings f16 serde" - - cargo +beta-$TARGET test --release --features "fail-on-warnings f16 serde" + - cargo +beta-$TARGET test --release --features "fail-on-warnings azf16 serde" - cargo +beta-$TARGET fmt -- --check - - cargo +1.34.2-$TARGET test --lib --features "fail-on-warnings f16 serde" - - cargo +1.34.2-$TARGET test --release --lib --features "fail-on-warnings f16 serde" + - cargo +1.34.2-$TARGET test --lib --features "fail-on-warnings az f16 serde" + - cargo +1.34.2-$TARGET test --release --lib --features "fail-on-warnings az f16 serde" diff --git a/README.md b/README.md index 73c11ed..4d8280c 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,10 @@ The conversions supported cover the following cases. ## What’s new +### Version 0.4.6 news (unreleased) + + * Support for casts using the [*az* crate] was added. + ### Version 0.4.5 news (2019-08-30) * Bug fix: display of many decimal numbers was panicking in debug @@ -227,11 +231,13 @@ The *fixed* crate requires rustc version 1.34.0 or later. ## Optional features -The *fixed* crate has two optional feature: +The *fixed* crate has three optional feature: - 1. `f16`, disabled by default. This provides conversion to/from + 1. `az`, disabled by default. This implements the cast traits + provided by the [*az* crate]. + 2. `f16`, disabled by default. This provides conversion to/from [`f16`]. This features requires the [*half* crate]. - 2. `serde`, disabled by default. This provides serialization support + 3. `serde`, disabled by default. This provides serialization support for the fixed-point types. This feature requires the [*serde* crate]. @@ -262,6 +268,7 @@ License, Version 2.0, shall be dual licensed as above, without any additional terms or conditions. [*Cargo.toml*]: https://doc.rust-lang.org/cargo/guide/dependencies.html +[*az* crate]: https://crates.io/crates/az [*fixed* crate]: https://crates.io/crates/fixed [*half* crate]: https://crates.io/crates/half [*serde* crate]: https://crates.io/crates/serde diff --git a/RELEASES.md b/RELEASES.md index 826562a..fa0e186 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -5,6 +5,11 @@ modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. --> +Version 0.4.6 (unreleased) +========================== + + * Support for casts using the *az* crate was added. + Version 0.4.5 (2019-08-30) ========================== diff --git a/src/lib.rs b/src/lib.rs index d9e3300..0cc86da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -144,11 +144,13 @@ The *fixed* crate requires rustc version 1.34.0 or later. ## Optional features -The *fixed* crate has two optional feature: +The *fixed* crate has three optional feature: - 1. `f16`, disabled by default. This provides conversion to/from + 1. `az`, disabled by default. This implements the cast traits + provided by the [*az* crate]. + 2. `f16`, disabled by default. This provides conversion to/from [`f16`]. This features requires the [*half* crate]. - 2. `serde`, disabled by default. This provides serialization support + 3. `serde`, disabled by default. This provides serialization support for the fixed-point types. This feature requires the [*serde* crate]. @@ -179,6 +181,7 @@ License, Version 2.0, shall be dual licensed as above, without any additional terms or conditions. [*Cargo.toml*]: https://doc.rust-lang.org/cargo/guide/dependencies.html +[*az* crate]: https://crates.io/crates/az [*fixed* crate]: https://crates.io/crates/fixed [*half* crate]: https://crates.io/crates/half [*serde* crate]: https://crates.io/crates/serde