aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-05-25 15:02:57 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-05-25 15:02:57 +0000
commit17957ae54a2ea98c4f2a8971cbd87270ceaa6e81 (patch)
tree0dc298b16ac0d9e721e41cabd2129379d4b640a4
parent2e5efd743e020fffa4ae10d4661756e4b4040d55 (diff)
parentd70fd00bb1e03b78f33e0341bb52529ecbf5a1b9 (diff)
downloadcast-17957ae54a2ea98c4f2a8971cbd87270ceaa6e81.tar.gz
Upgrade rust/crates/cast to 0.2.6 am: 80bf6a8313 am: cce3c7a643 am: 71a8d4fcc9 am: d70fd00bb1
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/cast/+/1712590 Change-Id: I77ae0a838faf6f1e8e6b42c3456d408a21e9a377
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp14
-rw-r--r--CHANGELOG.md19
-rw-r--r--Cargo.toml5
-rw-r--r--Cargo.toml.orig5
-rw-r--r--METADATA10
-rw-r--r--src/lib.rs13
-rw-r--r--src/test.rs8
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"
}
}
diff --git a/Android.bp b/Android.bp
index f02111e..33f1bf3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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
diff --git a/Cargo.toml b/Cargo.toml
index 40df4af..9fc55e0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"
diff --git a/METADATA b/METADATA
index 201e7db..1452b53 100644
--- a/METADATA
+++ b/METADATA
@@ -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
}
}
diff --git a/src/lib.rs b/src/lib.rs
index 4a8efe9..58d60ef 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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]