diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8fe9a70e83..39de2c80a0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,11 +40,9 @@ jobs: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly-2023-10-06 + toolchain: nightly-2024-02-07 components: rustfmt - name: run rustfmt - # note: for local development usually `cargo +nightly fmt` is sufficient; - # or `cargo +nightly-2023-08-18 fmt` for specifying the exact release. run: cargo fmt --all -- --check toml: diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 81e8cfaad5..9b4752101e 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -28,7 +28,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@1.73.0 + - uses: dtolnay/rust-toolchain@1.76.0 - uses: arduino/setup-protoc@v2 with: version: "24.4" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 277b2c3479..c8fe6bb195 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ jobs: version: "1.17.0" github_token: ${{ secrets.GITHUB_TOKEN }} - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@1.73.0 + uses: dtolnay/rust-toolchain@1.76.0 - uses: Swatinem/rust-cache@v2.6.1 with: cache-provider: "buildjet" @@ -43,44 +43,13 @@ jobs: exit 1 fi - cargo-toml-synced-with-containerfiles: - runs-on: ubuntu-22.04 - needs: run_checker - if: needs.run_checker.outputs.run_tests == 'true' - steps: - - uses: actions/checkout@v3 - - name: Download and install dasel - run: | - curl -fsSL \ - https://github.com/TomWright/dasel/releases/download/v2.5.0/dasel_linux_amd64.gz \ - | gzip -d - \ - | install -m 755 /dev/stdin /usr/local/bin/dasel - - name: Download and install taplo - run: | - curl -fsSL \ - https://github.com/tamasfe/taplo/releases/download/0.8.1/taplo-full-linux-x86_64.gz \ - | gzip -d - \ - | install -m 755 /dev/stdin /usr/local/bin/taplo - - name: Install just - uses: taiki-e/install-action@just - - name: Check if containerfiles/Cargo.toml is in sync with Cargo.toml - run: | - just update-containerfiles-cargo-toml - modified=$(git status --porcelain) - if [[ -n $modified ]]; then - echo "ERROR: containerfiles/Cargo.toml is out of sync with workspcae Cargo.toml" - echo "Run locally with \`just update-containerfiles-cargo-toml\` and commit to the repository." - exit 1 - fi - - compiles: runs-on: buildjet-4vcpu-ubuntu-2204 needs: run_checker if: needs.run_checker.outputs.run_tests == 'true' steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.73.0 + - uses: dtolnay/rust-toolchain@1.76.0 - uses: taiki-e/install-action@v2.15.2 with: tool: cargo-hack@0.5.29 @@ -103,7 +72,7 @@ jobs: if: needs.run_checker.outputs.run_tests == 'true' steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.73.0 + - uses: dtolnay/rust-toolchain@1.76.0 - uses: Swatinem/rust-cache@v2.6.1 with: cache-provider: "github" @@ -124,7 +93,7 @@ jobs: pip3 install solc-select solc-select install 0.8.15 solc-select use 0.8.15 - - uses: dtolnay/rust-toolchain@1.73.0 + - uses: dtolnay/rust-toolchain@1.76.0 - uses: Swatinem/rust-cache@v2.6.1 with: cache-provider: "buildjet" @@ -155,7 +124,7 @@ jobs: if: needs.run_checker.outputs.run_tests == 'true' steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.73.0 + - uses: dtolnay/rust-toolchain@1.76.0 - uses: Swatinem/rust-cache@v2.6.1 with: cache-provider: "buildjet" @@ -172,7 +141,7 @@ jobs: if: needs.run_checker.outputs.run_tests == 'true' && needs.run_checker.outputs.run_lint_rust == 'true' steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@1.73.0 + - uses: dtolnay/rust-toolchain@1.76.0 with: components: clippy - uses: Swatinem/rust-cache@v2.6.1 @@ -201,13 +170,13 @@ jobs: - uses: dtolnay/rust-toolchain@v1 with: # This has to match `rust-toolchain` in the rust-toolchain file of the dylint lints - toolchain: nightly-2023-10-06 + toolchain: nightly-2023-12-28 components: "clippy, llvm-tools-preview, rustc-dev" - uses: Swatinem/rust-cache@v2.6.1 with: cache-provider: "buildjet" - name: install cargo-dylint and dylint-link - run: cargo install cargo-dylint@2.5.0 dylint-link@2.5.0 --locked + run: cargo install cargo-dylint@2.6.1 dylint-link@2.6.1 --locked - uses: arduino/setup-protoc@v2 with: version: "24.4" @@ -229,7 +198,7 @@ jobs: test: if: ${{ always() && !cancelled() }} - needs: [compiles, protos-compiled, rust, doctest, clippy, lockfile, custom-lints, cargo-toml-synced-with-containerfiles] + needs: [compiles, protos-compiled, rust, doctest, clippy, lockfile, custom-lints] uses: ./.github/workflows/reusable-success.yml with: success: ${{ !contains(needs.*.result, 'failure') }} diff --git a/Cargo.lock b/Cargo.lock index 39264e10ef..353258290f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1593,14 +1593,24 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +[[package]] +name = "clippy_config" +version = "0.1.77" +source = "git+https://github.com/rust-lang/rust-clippy?rev=ac4c2094a6030530661bee3876e0228ddfeb6b8b#ac4c2094a6030530661bee3876e0228ddfeb6b8b" +dependencies = [ + "rustc-semver", + "serde", + "toml 0.7.8", +] + [[package]] name = "clippy_utils" -version = "0.1.75" -source = "git+https://github.com/rust-lang/rust-clippy?rev=b105fb4c39bc1a010807a6c076193cef8d93c109#b105fb4c39bc1a010807a6c076193cef8d93c109" +version = "0.1.77" +source = "git+https://github.com/rust-lang/rust-clippy?rev=ac4c2094a6030530661bee3876e0228ddfeb6b8b#ac4c2094a6030530661bee3876e0228ddfeb6b8b" dependencies = [ "arrayvec 0.7.4", - "if_chain", - "itertools 0.10.5", + "clippy_config", + "itertools 0.11.0", "rustc-semver", ] @@ -2230,9 +2240,9 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "dylint" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fdb7b800ab13925402f0048ed0911068db2e5ba6168dd93962269d4f39541d" +checksum = "4d6259cf4df09300534dcfa6a49918bb442327111e370c656b31f1c10ec08145" dependencies = [ "ansi_term", "anyhow", @@ -2251,12 +2261,13 @@ dependencies = [ [[package]] name = "dylint_internal" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5154dada2bee2a69f75f54eae57479f56f93ca1db80725a1d82cdb5fe231ef73" +checksum = "9400420c9ffa71c6b1b75d84225a150e3428eb12159e5bf4f56285bd9eb1c095" dependencies = [ "ansi_term", "anyhow", + "bitflags 2.4.1", "cargo_metadata", "git2", "home", @@ -2270,9 +2281,9 @@ dependencies = [ [[package]] name = "dylint_linting" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d203baeb8770847314632f652e0e62dd7fec6a21102a116472eec0d6931f5dd9" +checksum = "43fc05c7103dfadd497486bbbf941899888f4e19271da70b58f66385247230c2" dependencies = [ "cargo_metadata", "dylint_internal", @@ -2285,9 +2296,9 @@ dependencies = [ [[package]] name = "dylint_testing" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1208b1f2c40fc2f3c3fa0d5631efbc7a95721d619410dc2da5b0496810d6a941" +checksum = "785fa52ac8fe5f1056a71955f4ebda3ca90c269ef28b172ad85a3901752d5fdf" dependencies = [ "anyhow", "cargo_metadata", @@ -7492,6 +7503,18 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + [[package]] name = "toml" version = "0.8.8" @@ -7513,6 +7536,19 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.1.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "toml_edit" version = "0.20.7" diff --git a/README.md b/README.md index cdbaad46a7..0b68d1d38c 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ markdown. ```sh # Install rustfmt -rustup +nightly-2023-08-18 component add rustfmt +rustup +nightly-2024-02-07 component add rustfmt # Run rustfmt just fmt rust ``` diff --git a/containerfiles/Cargo.toml b/containerfiles/Cargo.toml deleted file mode 100644 index 044c8d79ba..0000000000 --- a/containerfiles/Cargo.toml +++ /dev/null @@ -1,93 +0,0 @@ -[workspace] -exclude = ['tools/protobuf-compiler'] -members = [ - 'crates/astria-celestia-client', - 'crates/astria-celestia-mock', - 'crates/astria-cli', - 'crates/astria-composer', - 'crates/astria-conductor', - 'crates/astria-config', - 'crates/astria-core', - 'crates/astria-merkle', - 'crates/astria-optimism', - 'crates/astria-sequencer', - 'crates/astria-sequencer-client', - 'crates/astria-sequencer-relayer', - 'crates/astria-sequencer-utils', - 'crates/astria-telemetry', - 'crates/astria-test-utils', - 'lint/*', -] -resolver = '2' - -[workspace.dependencies] -async-trait = '0.1.52' -axum = '0.6.16' -backon = '0.4.1' -base64 = '0.21' -base64-serde = '0.7.0' -bytes = '1' -clap = '4' -color-eyre = '0.6' -ed25519-consensus = '2.1.0' -ethers = '2.0.11' -eyre = '0.6' -futures = '0.3' -hex = '0.4' -hex-literal = '0.4.1' -humantime = '2.1.0' -hyper = '0.14' -ibc-types = '0.11.0' -once_cell = '1.17.1' -prost = '0.12' -prost-types = '0.12' -rand = '0.8.5' -regex = '1.9' -serde = '1' -serde_json = '1' -sha2 = '0.10' -tempfile = '3.6.0' -tendermint = '0.34.0' -tendermint-config = '0.34.0' -tendermint-proto = '0.34.0' -tendermint-rpc = '0.34.0' -thiserror = '1' -tokio = '1.28' -tokio-test = '0.4.2' -tokio-util = '0.7.9' -tonic = '0.10' -tracing = '0.1' -tryhard = '0.5.1' -which = '4.4.0' -wiremock = '0.5' - -[workspace.dependencies.celestia-tendermint] -git = 'https://github.com/eigerco/celestia-tendermint-rs' -package = 'tendermint' -rev = 'bbe7de8' - -[workspace.dependencies.jsonrpsee] -version = '0.20' - -[workspace.dependencies.penumbra-ibc] -default-features = false -git = 'https://github.com/penumbra-zone/penumbra.git' -rev = '1b1be7e1373401eaf30d63352ee680991cb42aea' - -[workspace.dependencies.penumbra-proto] -git = 'https://github.com/penumbra-zone/penumbra.git' -rev = '1b1be7e1373401eaf30d63352ee680991cb42aea' - -[workspace.dependencies.penumbra-tower-trace] -git = 'https://github.com/penumbra-zone/penumbra.git' -rev = '1b1be7e1373401eaf30d63352ee680991cb42aea' - -[workspace.dependencies.reqwest] -default-features = false -features = ['rustls-tls'] -version = '0.11' - -[workspace.metadata] -[workspace.metadata.dylint] -[[workspace.metadata.dylint.libraries]] -path = 'lint/tracing_debug_field' diff --git a/containerfiles/Dockerfile b/containerfiles/Dockerfile index 2ce1cf5f41..925914fde6 100644 --- a/containerfiles/Dockerfile +++ b/containerfiles/Dockerfile @@ -1,5 +1,5 @@ # build stage -FROM --platform=$BUILDPLATFORM lukemathwalker/cargo-chef:0.1.62-rust-1.73.0-bookworm AS chef +FROM --platform=$BUILDPLATFORM lukemathwalker/cargo-chef:0.1.63-rust-1.76.0-bookworm AS chef WORKDIR /build/ @@ -44,10 +44,6 @@ RUN \ FROM chef AS planner ARG TARGETBINARY COPY . . -# XXX: override Cargo.toml in the root with containerfiles/Cargo.toml, which -# does not contain the `default-members` entry. It currently throws off -# cargo chef. -COPY containerfiles/Cargo.toml Cargo.toml RUN cargo chef prepare --bin crates/$TARGETBINARY --recipe-path recipe.json FROM chef as builder diff --git a/crates/astria-cli/src/commands/rollup.rs b/crates/astria-cli/src/commands/rollup.rs index 571ed83765..ba514bd46c 100644 --- a/crates/astria-cli/src/commands/rollup.rs +++ b/crates/astria-cli/src/commands/rollup.rs @@ -411,22 +411,22 @@ mod test { #[test] fn test_update_yaml_value() { let mut yaml_value: serde_yaml::Value = serde_yaml::from_str( - r#" + r" config: rollup: name: test - "#, + ", ) .unwrap(); update_yaml_value(&mut yaml_value, "config.rollup.name", "bugbug").unwrap(); let updated: serde_yaml::Value = serde_yaml::from_str( - r#" + " config: rollup: name: bugbug - "#, + ", ) .unwrap(); assert_eq!(yaml_value, updated); @@ -435,11 +435,11 @@ mod test { #[test] fn test_update_yaml_value_errors() { let mut yaml_value: serde_yaml::Value = serde_yaml::from_str( - r#" + r" config: rollup: name: test - "#, + ", ) .unwrap(); diff --git a/crates/astria-cli/src/commands/sequencer.rs b/crates/astria-cli/src/commands/sequencer.rs index a9931bf91a..01a76f50a6 100644 --- a/crates/astria-cli/src/commands/sequencer.rs +++ b/crates/astria-cli/src/commands/sequencer.rs @@ -163,8 +163,7 @@ pub(crate) async fn send_transfer(args: &TransferArgs) -> eyre::Result<()> { .wrap_err("failed to decode private key bytes from hex string")? .try_into() .map_err(|_| eyre!("invalid private key length; must be 32 bytes"))?; - let sequencer_key = - SigningKey::try_from(private_key_bytes).wrap_err("failed to parse sequencer key")?; + let sequencer_key = SigningKey::from(private_key_bytes); // To and from addresses let from_address = Address::from_verification_key(sequencer_key.verification_key()); diff --git a/crates/astria-composer/src/searcher/executor/mod.rs b/crates/astria-composer/src/searcher/executor/mod.rs index ef2c38dc35..2e1f9cf8ca 100644 --- a/crates/astria-composer/src/searcher/executor/mod.rs +++ b/crates/astria-composer/src/searcher/executor/mod.rs @@ -139,8 +139,7 @@ impl Executor { .wrap_err("failed to decode private key bytes from hex string")? .try_into() .map_err(|_| eyre!("invalid private key length; must be 32 bytes"))?; - let sequencer_key = - SigningKey::try_from(private_key_bytes).wrap_err("failed to parse sequencer key")?; + let sequencer_key = SigningKey::from(private_key_bytes); private_key_bytes.zeroize(); let sequencer_address = Address::from_verification_key(sequencer_key.verification_key()); diff --git a/crates/astria-composer/src/searcher/rollup.rs b/crates/astria-composer/src/searcher/rollup.rs index 0310987dc8..2a1ab0a686 100644 --- a/crates/astria-composer/src/searcher/rollup.rs +++ b/crates/astria-composer/src/searcher/rollup.rs @@ -74,13 +74,13 @@ impl Rollup { mod tests { use super::*; + #[track_caller] fn expect_parse_rollups(rollups: impl AsRef) -> Vec { rollups .as_ref() .split(',') .map(|s| { - Rollup::parse(s) - .unwrap_or_else(|err| panic!("rollup '{s:?}' should parse: {err:?}")) + Rollup::parse(s).unwrap_or_else(|err| panic!("rollup '{s}' should parse: {err:?}")) }) .collect() } @@ -114,13 +114,13 @@ mod tests { assert_eq!(rollups[2].url, "foo.bar"); } - #[should_panic] + #[should_panic(expected = "rollup 'chain_1::http://some.url' should parse: ParseError")] #[test] fn parse_with_non_alnum_non_dash_chain_id_fails() { expect_parse_rollups("chain_1::http://some.url"); } - #[should_panic] + #[should_panic(expected = "rollup 'chain-1:http://some.url' should parse: ParseError")] #[test] fn parse_without_double_colon_fails() { expect_parse_rollups("chain-1:http://some.url"); diff --git a/crates/astria-composer/tests/blackbox/composer.rs b/crates/astria-composer/tests/blackbox/composer.rs index e3d9413466..23ee940d55 100644 --- a/crates/astria-composer/tests/blackbox/composer.rs +++ b/crates/astria-composer/tests/blackbox/composer.rs @@ -222,7 +222,7 @@ async fn mount_matcher_verifying_tx_integrity( let sequencer_tx = signed_tx_from_request(request); let sequence_action = sequencer_tx .actions() - .get(0) + .first() .unwrap() .as_sequence() .unwrap(); @@ -270,7 +270,7 @@ fn chain_id_nonce_from_request(request: &Request) -> (RollupId, u32) { let signed_tx = signed_tx_from_request(request); // validate that the transaction's first action is a sequence action - let Some(sent_action) = signed_tx.actions().get(0) else { + let Some(sent_action) = signed_tx.actions().first() else { panic!("received transaction contained no actions"); }; let Some(sequence_action) = sent_action.as_sequence() else { diff --git a/crates/astria-conductor/justfile b/crates/astria-conductor/justfile index 2c04880082..e6781fa0e8 100644 --- a/crates/astria-conductor/justfile +++ b/crates/astria-conductor/justfile @@ -8,9 +8,6 @@ default_env := 'local' copy-env TYPE=default_env: cp {{ TYPE }}.env.example .env -fmt: - cargo +nightly fmt - run: cargo run diff --git a/crates/astria-conductor/src/celestia/block_verifier.rs b/crates/astria-conductor/src/celestia/block_verifier.rs index 28fc3b4960..bd40c31fae 100644 --- a/crates/astria-conductor/src/celestia/block_verifier.rs +++ b/crates/astria-conductor/src/celestia/block_verifier.rs @@ -269,8 +269,7 @@ fn verify_vote_signature( public_key .verify( &signature, - &sequencer_client::tendermint_proto::types::CanonicalVote::try_from(canonical_vote) - .wrap_err("failed to turn commit canonical vote into proto type")? + &sequencer_client::tendermint_proto::types::CanonicalVote::from(canonical_vote) .encode_length_delimited_to_vec(), ) .wrap_err("failed to verify vote signature")?; @@ -352,8 +351,7 @@ mod test { chain_id, }; - let message = tendermint_proto::types::CanonicalVote::try_from(canonical_vote) - .unwrap() + let message = tendermint_proto::types::CanonicalVote::from(canonical_vote) .encode_length_delimited_to_vec(); let signature = signing_key.sign(&message); diff --git a/crates/astria-conductor/src/client_provider.rs b/crates/astria-conductor/src/client_provider.rs index cbf9c7cc81..9a0634a21e 100644 --- a/crates/astria-conductor/src/client_provider.rs +++ b/crates/astria-conductor/src/client_provider.rs @@ -238,7 +238,7 @@ pub(crate) mod mock { pub(crate) async fn setup() -> Self { let server = Server::builder().build("127.0.0.1:0").await.unwrap(); let mut module = RpcModule::new(()); - module.register_method("say_hello", |_, _| "lo").unwrap(); + module.register_method("say_hello", |_, ()| "lo").unwrap(); let address = server.local_addr().unwrap(); let handle = server.start(module); let pool = start_pool(&format!("ws://{address}")).unwrap(); diff --git a/crates/astria-core/src/sequencer/v1alpha1/transaction/mod.rs b/crates/astria-core/src/sequencer/v1alpha1/transaction/mod.rs index e2a07ccb47..48fac492ba 100644 --- a/crates/astria-core/src/sequencer/v1alpha1/transaction/mod.rs +++ b/crates/astria-core/src/sequencer/v1alpha1/transaction/mod.rs @@ -276,13 +276,12 @@ mod test { 178, 63, 69, 238, 27, 96, 95, 213, 135, 120, 87, 106, 196, ]) .unwrap(); - let signature = Signature::try_from([ + let signature = Signature::from([ 227, 85, 139, 137, 185, 81, 103, 226, 85, 208, 68, 190, 196, 105, 191, 191, 37, 227, 167, 21, 69, 165, 229, 163, 187, 104, 165, 40, 92, 8, 113, 67, 166, 194, 232, 156, 232, 117, 134, 105, 2, 90, 151, 35, 241, 136, 200, 46, 222, 37, 124, 219, 195, 20, 195, 24, 227, 96, 127, 152, 22, 47, 146, 10, - ]) - .unwrap(); + ]); let expected_hash: [u8; 32] = [ 208, 68, 247, 226, 65, 50, 227, 180, 178, 51, 28, 119, 212, 205, 148, 83, 27, 229, 238, 45, 192, 139, 169, 239, 16, 3, 103, 132, 220, 87, 150, 229, diff --git a/crates/astria-sequencer/src/app.rs b/crates/astria-sequencer/src/app.rs index f92b71f58d..13c5df3370 100644 --- a/crates/astria-sequencer/src/app.rs +++ b/crates/astria-sequencer/src/app.rs @@ -848,7 +848,7 @@ mod test { }, byzantine_validators: vec![], }; - begin_block.header.height = Height::try_from(1u8).unwrap(); + begin_block.header.height = 1u8.into(); app.begin_block(&begin_block, storage).await.unwrap(); assert_eq!(app.state.get_block_height().await.unwrap(), 1); @@ -905,7 +905,7 @@ mod test { }, byzantine_validators: vec![misbehavior], }; - begin_block.header.height = Height::try_from(1u8).unwrap(); + begin_block.header.height = 1u8.into(); app.begin_block(&begin_block, storage).await.unwrap(); @@ -1427,7 +1427,7 @@ mod test { }, byzantine_validators: vec![], }; - begin_block.header.height = Height::try_from(1u8).unwrap(); + begin_block.header.height = 1u8.into(); let proposer_address = Address::try_from_slice(begin_block.header.proposer_address.as_bytes()).unwrap(); diff --git a/crates/astria-sequencer/src/service/info/mod.rs b/crates/astria-sequencer/src/service/info/mod.rs index 034519837c..56db852d74 100644 --- a/crates/astria-sequencer/src/service/info/mod.rs +++ b/crates/astria-sequencer/src/service/info/mod.rs @@ -199,14 +199,15 @@ mod test { prove: false, }); - let query_response = match { + let response = { let storage = (*storage).clone(); let info_service = Info::new(storage).unwrap(); info_service .handle_info_request(info_request) .await .unwrap() - } { + }; + let query_response = match response { InfoResponse::Query(query) => query, other => panic!("expected InfoResponse::Query, got {other:?}"), }; diff --git a/justfile b/justfile index 4892e245ed..6f890970b5 100644 --- a/justfile +++ b/justfile @@ -14,11 +14,6 @@ install-cli: compile-protos: cargo run --manifest-path tools/protobuf-compiler/Cargo.toml -update-containerfiles-cargo-toml: - dasel delete -r toml -f Cargo.toml -o - 'workspace.default-members' \ - | taplo fmt - --stdin-filepath Cargo.toml \ - > containerfiles/Cargo.toml - ## Scripts related to formatting code default_lang := 'all' @@ -43,11 +38,11 @@ _fmt-all: [no-exit-message] _fmt-rust: - cargo +nightly-2023-08-18 fmt --all + cargo +nightly-2024-02-07 fmt --all [no-exit-message] _lint-rust: - cargo +nightly-2023-08-18 fmt --all -- --check + cargo +nightly-2024-02-07 fmt --all -- --check cargo clippy -- --warn clippy::pedantic cargo dylint --all diff --git a/lint/tracing_debug_field/Cargo.toml b/lint/tracing_debug_field/Cargo.toml index 19581c31cd..3ba5d34b53 100644 --- a/lint/tracing_debug_field/Cargo.toml +++ b/lint/tracing_debug_field/Cargo.toml @@ -13,12 +13,12 @@ name = "ui" path = "ui/main.rs" [dependencies] -clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "b105fb4c39bc1a010807a6c076193cef8d93c109" } -dylint_linting = "2.5.0" +clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "ac4c2094a6030530661bee3876e0228ddfeb6b8b" } +dylint_linting = "2.6.1" if_chain = "1.0.2" [dev-dependencies] -dylint_testing = "2.5.0" +dylint_testing = "2.6.1" tracing = "0.1" [package.metadata.rust-analyzer] diff --git a/lint/tracing_debug_field/rust-toolchain b/lint/tracing_debug_field/rust-toolchain index 0d0cb93cff..8c7951e24c 100644 --- a/lint/tracing_debug_field/rust-toolchain +++ b/lint/tracing_debug_field/rust-toolchain @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2023-10-06" +channel = "nightly-2023-12-28" components = ["llvm-tools-preview", "rustc-dev"]