diff options
author | Jeff Vander Stoep <jeffv@google.com> | 2024-02-02 09:31:56 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2024-02-02 09:31:56 +0000 |
commit | 15dc26204f3a5915bf189bb66b9f67371ee6d873 (patch) | |
tree | ac3d3be89ecdf22430217ad0de9783cf725dbd6d | |
parent | 21306d9521e0814ffb1c74645742e62f7b4f18fc (diff) | |
parent | 7a32db877fba05ba6cc9651335c7c8d48a114b04 (diff) | |
download | itoa-emu-34-2-dev.tar.gz |
Upgrade itoa to 1.0.10 am: 7a32db877femu-34-2-dev
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/itoa/+/2944226
Change-Id: Ifaf4aa7d471cb160d206b74c0438bc7f818cd1cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | .clippy.toml | 1 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 40 | ||||
-rw-r--r-- | Android.bp | 4 | ||||
-rw-r--r-- | Cargo.toml | 7 | ||||
-rw-r--r-- | Cargo.toml.orig | 8 | ||||
-rw-r--r-- | LICENSE-APACHE | 25 | ||||
-rw-r--r-- | METADATA | 23 | ||||
-rw-r--r-- | src/lib.rs | 7 | ||||
-rw-r--r-- | tests/test.rs | 1 |
10 files changed, 66 insertions, 52 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 4917a0e..d94e599 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "ef4faeda61024dfb38b3897e46aeda8140828dc6" + "sha1": "547c143d503f4624ff11ee13fd3a5b0274f4c27f" }, "path_in_vcs": "" }
\ No newline at end of file diff --git a/.clippy.toml b/.clippy.toml deleted file mode 100644 index 0a54853..0000000 --- a/.clippy.toml +++ /dev/null @@ -1 +0,0 @@ -msrv = "1.36.0" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d16faca..13bab49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ name: CI on: push: pull_request: + workflow_dispatch: schedule: [cron: "40 1 * * *"] permissions: @@ -12,8 +13,13 @@ env: RUSTFLAGS: -Dwarnings jobs: + pre_ci: + uses: dtolnay/.github/.github/workflows/pre_ci.yml@master + test: name: Rust ${{matrix.rust}} + needs: pre_ci + if: needs.pre_ci.outputs.continue runs-on: ubuntu-latest strategy: fail-fast: false @@ -21,10 +27,13 @@ jobs: rust: [nightly, beta, stable, 1.36.0] timeout-minutes: 45 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{matrix.rust}} + - name: Enable type layout randomization + run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV + if: matrix.rust == 'nightly' - run: cargo build - run: cargo test - run: cargo test --release @@ -36,13 +45,30 @@ jobs: - run: cargo bench --no-run if: matrix.rust == 'nightly' + doc: + name: Documentation + needs: pre_ci + if: needs.pre_ci.outputs.continue + runs-on: ubuntu-latest + timeout-minutes: 45 + env: + RUSTDOCFLAGS: -Dwarnings + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - uses: dtolnay/install@cargo-docs-rs + - run: cargo docs-rs + miri: name: Miri + needs: pre_ci + if: needs.pre_ci.outputs.continue runs-on: ubuntu-latest timeout-minutes: 45 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@miri + - run: cargo miri setup - run: cargo miri test env: MIRIFLAGS: -Zmiri-strict-provenance @@ -53,19 +79,21 @@ jobs: if: github.event_name != 'pull_request' timeout-minutes: 45 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@clippy - run: cargo clippy --tests --benches -- -Dclippy::all -Dclippy::pedantic fuzz: name: Fuzz + needs: pre_ci + if: needs.pre_ci.outputs.continue runs-on: ubuntu-latest timeout-minutes: 45 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@nightly - uses: dtolnay/install@cargo-fuzz - - run: cargo fuzz build -O + - run: cargo fuzz check outdated: name: Outdated @@ -73,7 +101,7 @@ jobs: if: github.event_name != 'pull_request' timeout-minutes: 45 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/install@cargo-outdated - run: cargo outdated --workspace --exit-code 1 - run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1 @@ -43,7 +43,7 @@ rust_test { host_supported: true, crate_name: "test", cargo_env_compat: true, - cargo_pkg_version: "1.0.5", + cargo_pkg_version: "1.0.10", srcs: ["tests/test.rs"], test_suites: ["general-tests"], auto_gen_config: true, @@ -59,7 +59,7 @@ rust_library { host_supported: true, crate_name: "itoa", cargo_env_compat: true, - cargo_pkg_version: "1.0.5", + cargo_pkg_version: "1.0.10", srcs: ["src/lib.rs"], edition: "2018", apex_available: [ @@ -13,7 +13,7 @@ edition = "2018" rust-version = "1.36" name = "itoa" -version = "1.0.5" +version = "1.0.10" authors = ["David Tolnay <dtolnay@gmail.com>"] exclude = [ "performance.png", @@ -26,13 +26,18 @@ keywords = ["integer"] categories = [ "value-formatting", "no-std", + "no-std::no-alloc", ] license = "MIT OR Apache-2.0" repository = "https://github.com/dtolnay/itoa" [package.metadata.docs.rs] +rustdoc-args = ["--generate-link-to-definition"] targets = ["x86_64-unknown-linux-gnu"] +[lib] +doc-scrape-examples = false + [dependencies.no-panic] version = "0.1" optional = true diff --git a/Cargo.toml.orig b/Cargo.toml.orig index a24b8e4..a977035 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,8 +1,8 @@ [package] name = "itoa" -version = "1.0.5" # remember to update html_root_url +version = "1.0.10" authors = ["David Tolnay <dtolnay@gmail.com>"] -categories = ["value-formatting", "no-std"] +categories = ["value-formatting", "no-std", "no-std::no-alloc"] description = "Fast integer primitive to string conversion" documentation = "https://docs.rs/itoa" edition = "2018" @@ -15,5 +15,9 @@ rust-version = "1.36" [dependencies] no-panic = { version = "0.1", optional = true } +[lib] +doc-scrape-examples = false + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] +rustdoc-args = ["--generate-link-to-definition"] diff --git a/LICENSE-APACHE b/LICENSE-APACHE index 16fe87b..1b5ec8b 100644 --- a/LICENSE-APACHE +++ b/LICENSE-APACHE @@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. @@ -1,23 +1,20 @@ # This project was upgraded with external_updater. -# Usage: tools/external_updater/updater.sh update rust/crates/itoa -# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md +# Usage: tools/external_updater/updater.sh update external/rust/crates/itoa +# For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md name: "itoa" description: "Fast integer primitive to string conversion" third_party { - url { - type: HOMEPAGE - value: "https://crates.io/crates/itoa" - } - url { - type: ARCHIVE - value: "https://static.crates.io/crates/itoa/itoa-1.0.5.crate" - } - version: "1.0.5" license_type: NOTICE last_upgrade_date { - year: 2023 + year: 2024 month: 2 - day: 2 + day: 1 + } + homepage: "https://crates.io/crates/itoa" + identifier { + type: "Archive" + value: "https://static.crates.io/crates/itoa/itoa-1.0.10.crate" + version: "1.0.10" } } @@ -30,12 +30,14 @@ //! //! ![performance](https://raw.githubusercontent.com/dtolnay/itoa/master/performance.png) -#![doc(html_root_url = "https://docs.rs/itoa/1.0.5")] +#![doc(html_root_url = "https://docs.rs/itoa/1.0.10")] #![no_std] #![allow( clippy::cast_lossless, clippy::cast_possible_truncation, + clippy::expl_impl_clone_on_copy, clippy::must_use_candidate, + clippy::needless_doctest_main, clippy::unreadable_literal )] @@ -71,8 +73,11 @@ impl Default for Buffer { } } +impl Copy for Buffer {} + impl Clone for Buffer { #[inline] + #[allow(clippy::non_canonical_clone_impl)] // false positive https://github.com/rust-lang/rust-clippy/issues/11072 fn clone(&self) -> Self { Buffer::new() } diff --git a/tests/test.rs b/tests/test.rs index 1d7e8cb..f8275d6 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -26,4 +26,5 @@ test! { test_u128_0(0u128, "0") test_u128_max(u128::max_value(), "340282366920938463463374607431768211455") test_i128_min(i128::min_value(), "-170141183460469231731687303715884105728") + test_i128_max(i128::max_value(), "170141183460469231731687303715884105727") } |