aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-10-14 19:28:16 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-10-14 19:28:16 +0000
commit31fb35b8f4fd6c083567c884264d0f3bb28bd4bf (patch)
tree0ea42a99027172a370ef97510f0727749334c49e
parente81c120953598b74638c6b75d2d979a2b8e3a4e9 (diff)
parent4699de0ac2ae72c1a6a1f48f681f32d9de193cfd (diff)
downloadprotobuf-31fb35b8f4fd6c083567c884264d0f3bb28bd4bf.tar.gz
Merge "Upgrade rust/crates/protobuf to 2.25.1" am: 6df3dff7d6 am: bfcacb22f0 am: a5b5351076 am: a405e7fa8f am: 4699de0ac2
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/protobuf/+/1833580 Change-Id: I1a517c352f3a7900502ea55e6dd32c489fff86b5
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp5
-rw-r--r--Cargo.toml2
-rw-r--r--Cargo.toml.orig2
-rw-r--r--METADATA8
-rw-r--r--out/version.rs6
-rw-r--r--src/text_format/lexer/lexer_impl.rs9
7 files changed, 20 insertions, 14 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 1911953..051cfa6 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
{
"git": {
- "sha1": "645d02b122c3c19309d1c56dee7f771829e36d76"
+ "sha1": "d65abd3c6cee1dacef1448146b488ee168492a7d"
}
}
diff --git a/Android.bp b/Android.bp
index babd7e3..4a21761 100644
--- a/Android.bp
+++ b/Android.bp
@@ -29,6 +29,8 @@ rust_library {
name: "libprotobuf",
host_supported: true,
crate_name: "protobuf",
+ cargo_env_compat: true,
+ cargo_pkg_version: "2.25.1",
srcs: [
"src/lib.rs",
":copy_protobuf_build_out",
@@ -43,6 +45,3 @@ rust_library {
"com.android.virt",
],
}
-
-// dependent_library ["feature_list"]
-// bytes-1.0.1 "default,std"
diff --git a/Cargo.toml b/Cargo.toml
index 5d507eb..005d7bf 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,7 +12,7 @@
[package]
edition = "2018"
name = "protobuf"
-version = "2.25.0"
+version = "2.25.1"
authors = ["Stepan Koltsov <stepan.koltsov@gmail.com>"]
description = "Rust implementation of Google protocol buffers\n"
homepage = "https://github.com/stepancheg/rust-protobuf/"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 5fef66e..058e8f1 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,7 +1,7 @@
[package]
name = "protobuf"
-version = "2.25.0"
+version = "2.25.1"
authors = ["Stepan Koltsov <stepan.koltsov@gmail.com>"]
edition = "2018"
license = "MIT"
diff --git a/METADATA b/METADATA
index 47c2b1c..08ae782 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/protobuf/protobuf-2.25.0.crate"
+ value: "https://static.crates.io/crates/protobuf/protobuf-2.25.1.crate"
}
- version: "2.25.0"
+ version: "2.25.1"
license_type: NOTICE
last_upgrade_date {
year: 2021
- month: 8
- day: 9
+ month: 9
+ day: 22
}
}
diff --git a/out/version.rs b/out/version.rs
index c5fda3f..fd20f6c 100644
--- a/out/version.rs
+++ b/out/version.rs
@@ -1,7 +1,7 @@
/// protobuf crate version
-pub const VERSION: &'static str = "2.25.0";
+pub const VERSION: &'static str = "2.25.1";
/// This symbol is used by codegen
#[doc(hidden)]
-pub const VERSION_IDENT: &'static str = "VERSION_2_25_0";
+pub const VERSION_IDENT: &'static str = "VERSION_2_25_1";
/// This symbol can be referenced to assert that proper version of crate is used
-pub const VERSION_2_25_0: () = ();
+pub const VERSION_2_25_1: () = ();
diff --git a/src/text_format/lexer/lexer_impl.rs b/src/text_format/lexer/lexer_impl.rs
index f824a7a..ae9035a 100644
--- a/src/text_format/lexer/lexer_impl.rs
+++ b/src/text_format/lexer/lexer_impl.rs
@@ -605,7 +605,7 @@ impl<'a> Lexer<'a> {
if let Some(c) = self.next_char_if_in("+-") {
s.push(c);
}
- s.push(self.next_char_expect(is_digit_1_9, LexerError::IncorrectJsonNumber)?);
+ s.push(self.next_char_expect(is_digit, LexerError::IncorrectJsonNumber)?);
while let Some(c) = self.next_char_if(is_digit) {
s.push(c);
}
@@ -716,4 +716,11 @@ mod test {
let mess = lex(msg, |p| p.next_token_inner());
assert_eq!(Token::FloatLit(12.3), mess);
}
+
+ #[test]
+ fn test_lexer_float_lit_leading_zeros_in_exp() {
+ let msg = r#"1e00009"#;
+ let mess = lex(msg, |p| p.next_token_inner());
+ assert_eq!(Token::FloatLit(1_000_000_000.0), mess);
+ }
}