From 6b4ae5a925e572c2a7d873b06acbe91ba23ff149 Mon Sep 17 00:00:00 2001 From: caibirdme Date: Wed, 23 Oct 2024 09:44:18 +0800 Subject: [PATCH 1/2] chore: upgrade rust to 1.82.0 --- .github/workflows/auto-docker.yml | 2 +- .github/workflows/docker-latest.yml | 2 +- .github/workflows/docker-tag.yml | 2 +- .github/workflows/prcheck.yaml | 2 +- Cargo.toml | 2 +- rust-toolchain.toml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/auto-docker.yml b/.github/workflows/auto-docker.yml index db6d630..6e0b0f3 100644 --- a/.github/workflows/auto-docker.yml +++ b/.github/workflows/auto-docker.yml @@ -46,7 +46,7 @@ jobs: - name: Set up Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.80.1 + toolchain: 1.82.0 profile: minimal override: true target: ${{ matrix.target }} diff --git a/.github/workflows/docker-latest.yml b/.github/workflows/docker-latest.yml index 5f23cfb..b4db23c 100644 --- a/.github/workflows/docker-latest.yml +++ b/.github/workflows/docker-latest.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.80.1 + toolchain: 1.82.0 profile: minimal override: true target: ${{ matrix.target }} diff --git a/.github/workflows/docker-tag.yml b/.github/workflows/docker-tag.yml index 9c65954..7f0e1fd 100644 --- a/.github/workflows/docker-tag.yml +++ b/.github/workflows/docker-tag.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.80.1 + toolchain: 1.82.0 profile: minimal override: true target: ${{ matrix.target }} diff --git a/.github/workflows/prcheck.yaml b/.github/workflows/prcheck.yaml index ed66b24..0ed540d 100644 --- a/.github/workflows/prcheck.yaml +++ b/.github/workflows/prcheck.yaml @@ -18,7 +18,7 @@ jobs: - name: Set up Rust uses: actions-rs/toolchain@v1 with: - toolchain: 1.80.1 + toolchain: 1.82.0 profile: minimal override: true - name: Install protoc diff --git a/Cargo.toml b/Cargo.toml index ff3e003..a5a1f3d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "ltbridge" version = "0.1.0" edition = "2021" -rust-version = "1.80.0" +rust-version = "1.82.0" authors = ["caibirdme <492877816@qq.com>"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 1d90744..8fab750 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.80.1" +channel = "1.82.0" targets = [ "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl" ] profile = "default" From ba7daeddf0a6f743f025fb168cc3c74d6e027a0e Mon Sep 17 00:00:00 2001 From: caibirdme Date: Wed, 23 Oct 2024 09:50:16 +0800 Subject: [PATCH 2/2] fix: clippy --- src/storage/ck/common.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/storage/ck/common.rs b/src/storage/ck/common.rs index 024d5ab..4b0f97a 100644 --- a/src/storage/ck/common.rs +++ b/src/storage/ck/common.rs @@ -115,9 +115,8 @@ pub(crate) async fn send_query( error!("fail to read ck response: {}", e); e })?; - let resp: RecordWarpper = serde_json::from_str(&res).map_err(|e| { + let resp: RecordWarpper = serde_json::from_str(&res).inspect_err(|_| { error!("fail to parse ck response: {}", res); - e })?; Ok(resp.data) }