diff options
author | Matthew Maurer <mmaurer@google.com> | 2023-05-26 20:23:03 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-05-26 20:23:03 +0000 |
commit | 5785a70800c5ffb6b8bbba5de2c1ff227ef29733 (patch) | |
tree | 253ca15ad9152e69f9d1c30282059875eaf4f2a2 | |
parent | b2857ce51ffeb069055a384e39e9af0034d39809 (diff) | |
parent | 3b2398c0242a0980470252f298098a5314488b1d (diff) | |
download | enumn-5785a70800c5ffb6b8bbba5de2c1ff227ef29733.tar.gz |
Upgrade enumn to 0.1.8 am: 3b2398c024
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/enumn/+/2506817
Change-Id: Id5fd32e773eca166c84daf6cecad82623e11fbdb
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 | 2 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 11 | ||||
-rw-r--r-- | Android.bp | 2 | ||||
-rw-r--r-- | Cargo.toml | 6 | ||||
-rw-r--r-- | Cargo.toml.orig | 6 | ||||
-rw-r--r-- | LICENSE-APACHE | 25 | ||||
-rw-r--r-- | METADATA | 8 | ||||
-rw-r--r-- | src/lib.rs | 3 |
9 files changed, 25 insertions, 40 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 081b42b..17d3e1a 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "6024ffd9b8fa3bf2da7da4e286980d93706dfa4b" + "sha1": "d1714c2316f243d91245eb834359fc074cf79a60" }, "path_in_vcs": "" }
\ No newline at end of file diff --git a/.clippy.toml b/.clippy.toml index 3d30690..0d369b5 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1 +1 @@ -msrv = "1.31.0" +msrv = "1.56.0" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc711bf..795a469 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,19 +13,27 @@ 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 matrix: - rust: [nightly, beta, stable, 1.31.0] + rust: [nightly, beta, stable, 1.56.0] timeout-minutes: 45 steps: - uses: actions/checkout@v3 - 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 test clippy: @@ -41,7 +41,7 @@ rust_proc_macro { name: "libenumn", crate_name: "enumn", cargo_env_compat: true, - cargo_pkg_version: "0.1.6", + cargo_pkg_version: "0.1.8", srcs: ["src/lib.rs"], edition: "2018", rustlibs: [ @@ -11,9 +11,9 @@ [package] edition = "2018" -rust-version = "1.31" +rust-version = "1.56" name = "enumn" -version = "0.1.6" +version = "0.1.8" authors = ["David Tolnay <dtolnay@gmail.com>"] description = "Convert number to enum" documentation = "https://docs.rs/enumn" @@ -42,4 +42,4 @@ version = "1.0" version = "1.0" [dependencies.syn] -version = "1.0" +version = "2.0" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index a4b1864..76b97d9 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "enumn" -version = "0.1.6" +version = "0.1.8" authors = ["David Tolnay <dtolnay@gmail.com>"] categories = ["rust-patterns", "no-std"] description = "Convert number to enum" @@ -9,7 +9,7 @@ edition = "2018" keywords = ["enum", "integer"] license = "MIT OR Apache-2.0" repository = "https://github.com/dtolnay/enumn" -rust-version = "1.31" +rust-version = "1.56" [lib] proc-macro = true @@ -17,7 +17,7 @@ proc-macro = true [dependencies] proc-macro2 = "1.0" quote = "1.0" -syn = "1.0" +syn = "2.0" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] 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. @@ -11,13 +11,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/enumn/enumn-0.1.6.crate" + value: "https://static.crates.io/crates/enumn/enumn-0.1.8.crate" } - version: "0.1.6" + version: "0.1.8" license_type: NOTICE last_upgrade_date { year: 2023 - month: 2 - day: 1 + month: 3 + day: 23 } } @@ -105,6 +105,7 @@ //! //! Here `Letter::n(65)` would return `Some(Letter::A)`. +#![doc(html_root_url = "https://docs.rs/enumn/0.1.8")] #![allow( clippy::missing_panics_doc, clippy::needless_doctest_main, @@ -140,7 +141,7 @@ pub fn derive(input: TokenStream) -> TokenStream { // Parse repr attribute like #[repr(u16)]. let mut repr = None; for attr in input.attrs { - if attr.path.is_ident("repr") { + if attr.path().is_ident("repr") { if let Ok(name) = attr.parse_args::<Ident>() { match name.to_string().as_str() { "u8" | "u16" | "u32" | "u64" | "u128" | "usize" | "i8" | "i16" | "i32" |