diff options
author | Joel Galenson <jgalenson@google.com> | 2021-09-22 11:15:11 -0700 |
---|---|---|
committer | Joel Galenson <jgalenson@google.com> | 2021-09-22 11:15:11 -0700 |
commit | 14e56e091f97c36b474b1fe784dee7d24fe77066 (patch) | |
tree | 0ea42a99027172a370ef97510f0727749334c49e | |
parent | d1ce38a679166b96e71f84398a34fcd47629dc88 (diff) | |
download | protobuf-14e56e091f97c36b474b1fe784dee7d24fe77066.tar.gz |
Upgrade rust/crates/protobuf to 2.25.1
Test: make
Change-Id: I246706ce9d2c30010727a7066b16555e8d52ea57
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Android.bp | 5 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | Cargo.toml.orig | 2 | ||||
-rw-r--r-- | METADATA | 8 | ||||
-rw-r--r-- | out/version.rs | 6 | ||||
-rw-r--r-- | src/text_format/lexer/lexer_impl.rs | 9 |
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" } } @@ -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" @@ -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" @@ -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); + } } |