chore: fix tests for Rust 1.65 release (#5164)

Rust 1.65 reduces some struct sizes.
This commit is contained in:
Carl Lerche 2022-11-03 14:24:10 -07:00 committed by GitHub
parent 74a29be607
commit df6348fb4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -11,7 +11,7 @@ env:
RUST_BACKTRACE: 1 RUST_BACKTRACE: 1
# Change to specific Rust release to pin # Change to specific Rust release to pin
rust_stable: stable rust_stable: stable
rust_nightly: nightly-2022-07-26 rust_nightly: nightly-2022-11-03
rust_clippy: 1.56.0 rust_clippy: 1.56.0
# When updating this, also update: # When updating this, also update:
# - README.md # - README.md
@ -555,15 +555,17 @@ jobs:
- ubuntu-latest - ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install Rust ${{ env.rust_nightly }} - name: Install Rust nightly-2022-07-25
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
toolchain: ${{ env.rust_nightly }} # `check-external-types` requires a specific Rust nightly version. See
# the README for details: https://github.com/awslabs/cargo-check-external-types
toolchain: nightly-2022-07-25
override: true override: true
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
- name: check-external-types - name: check-external-types
run: | run: |
set -x set -x
cargo install cargo-check-external-types --locked --version 0.1.3 cargo install cargo-check-external-types --locked --version 0.1.5
cargo check-external-types --all-features --config external-types.toml cargo check-external-types --all-features --config external-types.toml
working-directory: tokio working-directory: tokio

View File

@ -81,7 +81,7 @@ fn join_size() {
let ready2 = future::ready(0i32); let ready2 = future::ready(0i32);
tokio::join!(ready1, ready2) tokio::join!(ready1, ready2)
}; };
assert_eq!(mem::size_of_val(&fut), 48); assert_eq!(mem::size_of_val(&fut), 40);
} }
async fn non_cooperative_task(permits: Arc<Semaphore>) -> usize { async fn non_cooperative_task(permits: Arc<Semaphore>) -> usize {