diff options
author | Joel Galenson <jgalenson@google.com> | 2021-05-25 13:19:20 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-05-25 13:19:20 +0000 |
commit | 71a8d4fcc901b16a8c5b7495061e4edb19e9ee81 (patch) | |
tree | 0dc298b16ac0d9e721e41cabd2129379d4b640a4 | |
parent | dcec7851dce0b4eceef0be2eedfe58094548533b (diff) | |
parent | cce3c7a643f5782cbccd6dc7693c5cbada824778 (diff) | |
download | cast-71a8d4fcc901b16a8c5b7495061e4edb19e9ee81.tar.gz |
Upgrade rust/crates/cast to 0.2.6 am: 80bf6a8313 am: cce3c7a643
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/cast/+/1712590
Change-Id: I1f4cab92f4bf7f6cf482cb3aa166566a13ec6b1f
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Android.bp | 14 | ||||
-rw-r--r-- | CHANGELOG.md | 19 | ||||
-rw-r--r-- | Cargo.toml | 5 | ||||
-rw-r--r-- | Cargo.toml.orig | 5 | ||||
-rw-r--r-- | METADATA | 10 | ||||
-rw-r--r-- | src/lib.rs | 13 | ||||
-rw-r--r-- | src/test.rs | 8 |
8 files changed, 47 insertions, 29 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 13f1433..6b07d61 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "74cec5dcf2014ecfe7cb05837b147cbb4f49024e" + "sha1": "64d81c563357bd14340899a647eb73968d3af226" } } @@ -42,17 +42,17 @@ rust_library { host_supported: true, crate_name: "cast", srcs: ["src/lib.rs"], - edition: "2015", + edition: "2018", features: [ "default", "std", ], - flags: [ - "--cfg stable_i128", - ], + cfgs: ["stable_i128"], } // dependent_library ["feature_list"] -// rustc_version-0.2.3 -// semver-0.9.0 "default" -// semver-parser-0.7.0 +// 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" diff --git a/CHANGELOG.md b/CHANGELOG.md index eb26758..04ab0f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [v0.2.6] - 2021-05-15 + +### Changed + +- Bumped `rustc_version` dependency + +## [v0.2.5] - 2021-04-13 + +### Fixed + +- Build on platforms with 32-bit pointers + +## [v0.2.4] - 2021-04-11 - YANKED + ## [v0.2.3] - 2018-11-17 ### Changed @@ -47,7 +61,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). Initial release -[Unreleased]: https://github.com/japaric/cast.rs/compare/v0.2.3...HEAD +[Unreleased]: https://github.com/japaric/cast.rs/compare/v0.2.6...HEAD +[v0.2.6]: https://github.com/japaric/cast.rs/compare/v0.2.5...v0.2.6 +[v0.2.5]: https://github.com/japaric/cast.rs/compare/v0.2.4...v0.2.5 +[v0.2.4]: https://github.com/japaric/cast.rs/compare/v0.2.3...v0.2.4 [v0.2.3]: https://github.com/japaric/cast.rs/compare/v0.2.2...v0.2.3 [v0.2.2]: https://github.com/japaric/cast.rs/compare/v0.2.1...v0.2.2 [v0.2.1]: https://github.com/japaric/cast.rs/compare/v0.2.0...v0.2.1 @@ -11,8 +11,9 @@ # will likely look very different (and much more reasonable) [package] +edition = "2018" name = "cast" -version = "0.2.3" +version = "0.2.6" authors = ["Jorge Aparicio <jorge@japaric.io>"] build = "build.rs" description = "Ergonomic, checked cast functions for primitive types" @@ -23,7 +24,7 @@ repository = "https://github.com/japaric/cast.rs" [dev-dependencies.quickcheck] version = "0.9.0" [build-dependencies.rustc_version] -version = "0.2.3" +version = "0.3.3" [features] default = ["std"] diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 6e95860..58c3312 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -7,7 +7,8 @@ keywords = ["checked", "cast", "primitive", "integer", "float"] license = "MIT OR Apache-2.0" name = "cast" repository = "https://github.com/japaric/cast.rs" -version = "0.2.3" +version = "0.2.6" +edition = "2018" [features] # Assume we should use `std` unless asked to do otherwise. @@ -19,7 +20,7 @@ std = [] x128 = [] [build-dependencies] -rustc_version = "0.2.3" +rustc_version = "0.3.3" [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.3.crate" + value: "https://static.crates.io/crates/cast/cast-0.2.6.crate" } - version: "0.2.3" + version: "0.2.6" license_type: NOTICE last_upgrade_date { - year: 2020 - month: 12 - day: 21 + year: 2021 + month: 5 + day: 19 } } @@ -101,8 +101,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(all(feature = "x128", not(stable_i128)), feature(i128_type, i128))] -#[cfg(feature = "std")] -extern crate core; + #[cfg(test)] #[macro_use] @@ -144,7 +143,7 @@ impl Error { } impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self.description_helper()) } } @@ -162,7 +161,7 @@ pub trait From<Src> { type Output; /// Checked cast from `Src` to `Self` - fn cast(Src) -> Self::Output; + fn cast(_: Src) -> Self::Output; } macro_rules! fns { @@ -359,7 +358,7 @@ macro_rules! from_float_dst { #[cfg(target_pointer_width = "32")] mod _32 { - use {Error, From}; + use crate::{Error, From}; // Signed promotion! { @@ -417,7 +416,7 @@ mod _32 { #[cfg(target_pointer_width = "64")] mod _64 { - use {Error, From}; + use crate::{Error, From}; // Signed promotion! { @@ -475,7 +474,7 @@ mod _64 { #[cfg(feature = "x128")] mod _x128 { - use {Error, From}; + use crate::{Error, From}; // Signed promotion! { diff --git a/src/test.rs b/src/test.rs index 6b619ab..da890ed 100644 --- a/src/test.rs +++ b/src/test.rs @@ -6,7 +6,7 @@ macro_rules! promote_and_back { $( mod $src { mod from { - use From; + use crate::From; $( quickcheck! { @@ -78,7 +78,7 @@ macro_rules! symmetric_cast_between { mod and { use quickcheck::TestResult; - use From; + use crate::From; $( quickcheck! { @@ -130,7 +130,7 @@ macro_rules! from_float { mod $src { mod inf { mod to { - use {Error, From}; + use crate::{Error, From}; $( #[test] @@ -151,7 +151,7 @@ macro_rules! from_float { mod nan { mod to { - use {Error, From}; + use crate::{Error, From}; $( #[test] |