diff options
author | Joel Galenson <jgalenson@google.com> | 2021-08-13 00:11:38 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-08-13 00:11:38 +0000 |
commit | b7644ad73812e398f52e7c2d58c0a13fb83c6fe7 (patch) | |
tree | f3beeb2524523fde5f9f105e35d9a499df91b27a | |
parent | d70fd00bb1e03b78f33e0341bb52529ecbf5a1b9 (diff) | |
parent | af4798612934bd5c06441ea3dc4c3abc2703c4f2 (diff) | |
download | cast-b7644ad73812e398f52e7c2d58c0a13fb83c6fe7.tar.gz |
Upgrade rust/crates/cast to 0.2.7 am: 2d2f5bcda8 am: 0774bb4772 am: fc04201e56 am: af47986129
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/cast/+/1791027
Change-Id: Ia47c66ac47dd79a9798cd95b8055dc33e976a66a
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 42 | ||||
-rw-r--r-- | .travis.yml | 35 | ||||
-rw-r--r-- | Android.bp | 7 | ||||
-rw-r--r-- | CHANGELOG.md | 6 | ||||
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | Cargo.toml.orig | 4 | ||||
-rw-r--r-- | METADATA | 8 | ||||
-rw-r--r-- | ci/install.sh | 9 | ||||
-rw-r--r-- | ci/script.sh | 43 | ||||
-rw-r--r-- | src/test.rs | 2 |
11 files changed, 60 insertions, 102 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 6b07d61..5248caf 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "64d81c563357bd14340899a647eb73968d3af226" + "sha1": "2a65e69cb9aaba4a29f860e8c407cd2addba143b" } } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..dfa5f6c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +on: + push: + branches: [main] + pull_request: + branches: [main] + +name: Continuous integration + +jobs: + test : + name: Test Suite + runs-on: ubuntu-latest + + strategy: + matrix: + target: + - x86_64-unknown-linux-gnu + - i686-unknown-linux-musl + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: ${{ matrix.target }} + override: true + + - uses: actions-rs/cargo@v1 + with: + command: test + args: --target ${{ matrix.target }} + + - uses: actions-rs/cargo@v1 + with: + command: test + args: --target ${{ matrix.target }} --no-default-features + + - uses: actions-rs/cargo@v1 + with: + command: test + args: --target ${{ matrix.target }} --features x128 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6da2fc0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: rust - -matrix: - include: - # MSRV - - env: TARGET=x86_64-unknown-linux-gnu - rust: 1.13.0 - - # 32-bit - - env: TARGET=i686-unknown-linux-musl - - env: TARGET=x86_64-unknown-linux-gnu - -before_install: set -e - -install: - - bash ci/install.sh - -script: - - bash ci/script.sh - -after_script: set +e - -cache: cargo - -before_cache: - - chmod -R a+r $HOME/.cargo - -branches: - only: - - staging - - trying - -notifications: - email: - on_success: never @@ -51,8 +51,5 @@ rust_library { } // dependent_library ["feature_list"] -// pest-2.1.3 -// rustc_version-0.3.3 -// semver-0.11.0 "default" -// semver-parser-0.10.2 -// ucd-trie-0.1.3 "default,std" +// rustc_version-0.4.0 +// semver-1.0.4 "default,std" diff --git a/CHANGELOG.md b/CHANGELOG.md index 04ab0f8..22a8a9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [v0.2.7] - 2021-07-03 + +### Changed + +- Bumped `rustc_version` dependency to v0.4.0 + ## [v0.2.6] - 2021-05-15 ### Changed @@ -13,7 +13,7 @@ [package] edition = "2018" name = "cast" -version = "0.2.6" +version = "0.2.7" authors = ["Jorge Aparicio <jorge@japaric.io>"] build = "build.rs" description = "Ergonomic, checked cast functions for primitive types" @@ -24,7 +24,7 @@ repository = "https://github.com/japaric/cast.rs" [dev-dependencies.quickcheck] version = "0.9.0" [build-dependencies.rustc_version] -version = "0.3.3" +version = "0.4.0" [features] default = ["std"] diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 58c3312..ddfdea9 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -7,7 +7,7 @@ keywords = ["checked", "cast", "primitive", "integer", "float"] license = "MIT OR Apache-2.0" name = "cast" repository = "https://github.com/japaric/cast.rs" -version = "0.2.6" +version = "0.2.7" edition = "2018" [features] @@ -20,7 +20,7 @@ std = [] x128 = [] [build-dependencies] -rustc_version = "0.3.3" +rustc_version = "0.4.0" [dev-dependencies] quickcheck = "0.9.0" @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/cast/cast-0.2.6.crate" + value: "https://static.crates.io/crates/cast/cast-0.2.7.crate" } - version: "0.2.6" + version: "0.2.7" license_type: NOTICE last_upgrade_date { year: 2021 - month: 5 - day: 19 + month: 8 + day: 9 } } diff --git a/ci/install.sh b/ci/install.sh deleted file mode 100644 index 3c41921..0000000 --- a/ci/install.sh +++ /dev/null @@ -1,9 +0,0 @@ -set -euxo pipefail - -main() { - if [ $TARGET != x86_64-unknown-linux-gnu ]; then - rustup target add $TARGET - fi -} - -main diff --git a/ci/script.sh b/ci/script.sh deleted file mode 100644 index 12b2619..0000000 --- a/ci/script.sh +++ /dev/null @@ -1,43 +0,0 @@ -set -euxo pipefail - -main() { - # not MSRV - if [ $TRAVIS_RUST_VERSION != 1.13.0 ]; then - cargo check --target $TARGET --no-default-features - - cargo test --features x128 --target $TARGET - cargo test --features x128 --target $TARGET --release - else - cargo build --target $TARGET --no-default-features - cargo build --target $TARGET - fi -} - -# fake Travis variables to be able to run this on a local machine -if [ -z ${TRAVIS_BRANCH-} ]; then - TRAVIS_BRANCH=staging -fi - -if [ -z ${TRAVIS_PULL_REQUEST-} ]; then - TRAVIS_PULL_REQUEST=false -fi - -if [ -z ${TRAVIS_RUST_VERSION-} ]; then - case $(rustc -V) in - *nightly*) - TRAVIS_RUST_VERSION=nightly - ;; - *beta*) - TRAVIS_RUST_VERSION=beta - ;; - *) - TRAVIS_RUST_VERSION=stable - ;; - esac -fi - -if [ -z ${TARGET-} ]; then - TARGET=$(rustc -Vv | grep host | cut -d ' ' -f2) -fi - -main diff --git a/src/test.rs b/src/test.rs index da890ed..f083f96 100644 --- a/src/test.rs +++ b/src/test.rs @@ -186,7 +186,7 @@ from_float! { #[test] #[cfg(feature = "x128")] fn test_fl_conversion() { - use u128; + use crate::u128; assert_eq!(u128(42.0f32), Ok(42)); } |