diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 05aba6f60..bd25f71ef 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,6 +11,9 @@ env: jobs: benchmark: + defaults: + run: + working-directory: ./async-nats runs-on: ubuntu-latest steps: - name: Check out repository @@ -36,7 +39,7 @@ jobs: with: shared-key: ${{ runner.os }}-${{ steps.install-rust.outputs.cachekey }}-${{ hashFiles('**/Cargo.toml') }} - name: Build the package # for caching - run: cargo build --all --all-targets + run: cargo build --all-targets - name: Run benchmarks env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7cec24937..ae845be7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,9 @@ defaults: jobs: test_matrix: + defaults: + run: + working-directory: ./async-nats name: test (${{ matrix.os }} / stable) runs-on: ${{ matrix.os }} strategy: @@ -55,7 +58,8 @@ jobs: cache-on-failure: true - name: Build all packages id: build-packages - run: cargo build --all --all-targets + run: | + cargo build --all-targets - name: Setup deno for service tests if: ${{ matrix.os }} != windows-latest @@ -91,6 +95,9 @@ jobs: run: cargo fmt -- --check check_lint: + defaults: + run: + working-directory: ./async-nats name: check linter (ubuntu-latest / stable) runs-on: ubuntu-latest steps: @@ -109,9 +116,12 @@ jobs: save-if: false # the linter only run checks but not builds, so we don't have the full build to be cached. - name: Run linter - run: cargo clippy --benches --tests --examples --all-features --workspace --exclude nats -- --deny clippy::all + run: cargo clippy --benches --tests --examples --all-features -- --deny clippy::all check_docs: + defaults: + run: + working-directory: ./async-nats name: check docs (ubuntu-latest / stable) runs-on: ubuntu-latest steps: @@ -131,6 +141,9 @@ jobs: run: cargo doc --no-deps --all-features check_features: + defaults: + run: + working-directory: ./async-nats name: check feature flags (ubuntu-latest / stable) runs-on: ubuntu-latest steps: @@ -163,6 +176,9 @@ jobs: command-arguments: licenses check_msrv: + defaults: + run: + working-directory: ./async-nats name: check minimal supported rust version (ubuntu-latest / msrv) runs-on: ubuntu-latest steps: @@ -185,6 +201,9 @@ jobs: cargo +${{ steps.install-rust.outputs.name }} check check_examples: + defaults: + run: + working-directory: ./async-nats name: check examples (ubuntu-latest / stable) runs-on: ubuntu-latest steps: @@ -231,6 +250,9 @@ jobs: run: cargo spellcheck --code 1 check_min_versions: + defaults: + run: + working-directory: ./async-nats name: check minimal versions of transitive dependencies (ubuntu-latest / stable) runs-on: ubuntu-latest steps: diff --git a/async-nats/src/jetstream/consumer/push.rs b/async-nats/src/jetstream/consumer/push.rs index 221a9ab44..3453b0a1b 100644 --- a/async-nats/src/jetstream/consumer/push.rs +++ b/async-nats/src/jetstream/consumer/push.rs @@ -478,7 +478,7 @@ impl IntoConsumerConfig for OrderedConfig { } impl Consumer { - pub async fn messages<'a>(self) -> Result { + pub async fn messages(self) -> Result { let subscriber = self .context .client diff --git a/async-nats/src/jetstream/object_store/mod.rs b/async-nats/src/jetstream/object_store/mod.rs index db1b9d6cc..dde5c7eee 100644 --- a/async-nats/src/jetstream/object_store/mod.rs +++ b/async-nats/src/jetstream/object_store/mod.rs @@ -671,7 +671,7 @@ impl ObjectStore { /// # Ok(()) /// # } /// ``` - pub async fn add_link<'a, T, O>(&self, name: T, object: O) -> Result + pub async fn add_link(&self, name: T, object: O) -> Result where T: ToString, O: AsObjectInfo, diff --git a/nats-server/Cargo.toml b/nats-server/Cargo.toml index 36234f764..d67bfc4b9 100644 --- a/nats-server/Cargo.toml +++ b/nats-server/Cargo.toml @@ -16,6 +16,6 @@ rand = "0.8" tokio-retry = "0.3.0" [dev-dependencies] -async-nats = "0.31" +async-nats = "0.38" tokio = { version = "1", features = ["full"] } futures = "0.3" diff --git a/nats/Cargo.toml b/nats/Cargo.toml index 7769c7c1f..8adb25297 100644 --- a/nats/Cargo.toml +++ b/nats/Cargo.toml @@ -34,7 +34,7 @@ json = "0.12.4" lazy_static = "1.4.0" log = "0.4.14" nkeys = "0.4.1" -nuid = "0.3.1" +nuid = "0.5.0" once_cell = "1.8.0" parking_lot = "0.12.0" portable-atomic = "1" diff --git a/nats/src/object_store.rs b/nats/src/object_store.rs index 1aeae117b..cfe721289 100644 --- a/nats/src/object_store.rs +++ b/nats/src/object_store.rs @@ -469,7 +469,7 @@ impl ObjectStore { description: object_meta.description, link: object_meta.link, bucket: self.name.clone(), - nuid: object_nuid, + nuid: object_nuid.to_string(), chunks: object_chunks, size: object_size, digest: format!("SHA-256={}", base64::encode_config(digest, URL_SAFE)),