From 5a1256ef443fbd161ce23ff9ffaaa6a555b08276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Bizjak?= Date: Wed, 14 Feb 2024 14:12:42 +0100 Subject: [PATCH] Bump MSRV to 1.72. --- .github/workflows/build-and-test.yaml | 19 ++++++++++++++++++- CHANGELOG.md | 1 + Cargo.toml | 4 ++-- src/indexer.rs | 6 ++++++ 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 3ee24b986..dd3ba32f8 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -16,7 +16,7 @@ on: env: RUST_FMT: nightly-2023-04-01-x86_64-unknown-linux-gnu - RUST_VERSION: "1.67" + RUST_VERSION: "1.72" jobs: "lint_fmt": @@ -49,6 +49,23 @@ jobs: rustup component add rust-docs RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --features postgres --color=always + # Check compilation of just the crate without tests and examples. This is to + # make sure that the features are correctly set for the normal dependencies. + "check_pure_compilation": + name: lint:clippy + # Don't run on draft pull requests + if: ${{ !github.event.pull_request.draft }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Clippy + run: | + rustup default $RUST_VERSION + cargo check + "lint_clippy_test": name: lint:clippy # Don't run on draft pull requests diff --git a/CHANGELOG.md b/CHANGELOG.md index a38b2c1ba..43e83d16a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Add a `ProcessorConfig` struct dual to the `TraverseConfig` to help in writing indexers. +- Bump MSRV to 1.72 ## 4.1.1 diff --git a/Cargo.toml b/Cargo.toml index 89697b109..7532e2799 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "concordium-rust-sdk" version = "4.1.1" authors = ["Concordium "] edition = "2021" -rust-version = "1.67" +rust-version = "1.72" license-file = "LICENSE" readme = "README.md" include = ["src/", "examples/", "CHANGELOG.md"] @@ -16,7 +16,7 @@ homepage = "https://github.com/Concordium/concordium-rust-sdk" [dependencies] tonic = {version = "0.10"} prost = "0.12" -tokio = { version = "1.27", features = ["net"] } +tokio = { version = "1.27", features = ["net", "macros"] } futures = "0.3" serde_json = "1.0" serde = {version = "1.0", features = ["derive"]} diff --git a/src/indexer.rs b/src/indexer.rs index 6845d78c6..75cdbb02f 100644 --- a/src/indexer.rs +++ b/src/indexer.rs @@ -716,6 +716,12 @@ pub struct ProcessorConfig { stop: std::pin::Pin>>, } +/// The default implementation behaves the same as +/// [`ProcessorConfig::new`](ProcessorConfig::new). +impl Default for ProcessorConfig { + fn default() -> Self { Self::new() } +} + impl ProcessorConfig { /// After each failure the [`Processor`] will pause a bit before trying /// again. Defaults to 5 seconds.