From 05fbd94ecfd421b40b2ba290bb80e2f66d8de781 Mon Sep 17 00:00:00 2001 From: "hash-worker[bot]" <180894564+hash-worker[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 07:37:42 +0000 Subject: [PATCH 1/2] Update Rust toolchains to nightly-2025-01-13 --- libs/antsi/rust-toolchain.toml | 2 +- libs/deer/rust-toolchain.toml | 2 +- libs/error-stack/README.md | 2 +- libs/error-stack/macros/README.md | 2 +- libs/error-stack/rust-toolchain.toml | 2 +- libs/error-stack/src/lib.rs | 2 +- libs/sarif/rust-toolchain.toml | 2 +- rust-toolchain.toml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/antsi/rust-toolchain.toml b/libs/antsi/rust-toolchain.toml index 96eaf5d9f0d..f83e862502b 100644 --- a/libs/antsi/rust-toolchain.toml +++ b/libs/antsi/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2025-01-08" +channel = "nightly-2025-01-13" components = ['rustfmt', 'clippy', 'llvm-tools-preview', 'rust-analyzer', 'rustc-codegen-cranelift-preview'] diff --git a/libs/deer/rust-toolchain.toml b/libs/deer/rust-toolchain.toml index 1f187be9bb4..699c469f6a2 100644 --- a/libs/deer/rust-toolchain.toml +++ b/libs/deer/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2025-01-08" +channel = "nightly-2025-01-13" components = ['rustfmt', 'clippy', 'llvm-tools-preview', 'miri', 'rust-analyzer', 'rustc-codegen-cranelift-preview'] diff --git a/libs/error-stack/README.md b/libs/error-stack/README.md index 3d76b11fc19..ac989e9674e 100644 --- a/libs/error-stack/README.md +++ b/libs/error-stack/README.md @@ -7,7 +7,7 @@ [![crates.io](https://img.shields.io/crates/v/error-stack)][crates.io] [![libs.rs](https://img.shields.io/badge/libs.rs-error--stack-orange)][libs.rs] -[![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.83.0/nightly-2025-01-08&color=blue)][rust-version] +[![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.83.0/nightly-2025-01-13&color=blue)][rust-version] [![documentation](https://img.shields.io/docsrs/error-stack)][documentation] [![license](https://img.shields.io/crates/l/error-stack)][license] diff --git a/libs/error-stack/macros/README.md b/libs/error-stack/macros/README.md index 5e969e8679c..660bfc43d0e 100644 --- a/libs/error-stack/macros/README.md +++ b/libs/error-stack/macros/README.md @@ -6,7 +6,7 @@ [![crates.io](https://img.shields.io/crates/v/error-stack-macros)][crates.io] [![libs.rs](https://img.shields.io/badge/libs.rs-error--stack--macros-orange)][libs.rs] -[![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.83.0/nightly-2025-01-08&color=blue)][rust-version] +[![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.83.0/nightly-2025-01-13&color=blue)][rust-version] [![documentation](https://img.shields.io/docsrs/error-stack-macros)][documentation] [![license](https://img.shields.io/crates/l/error-stack)][license] diff --git a/libs/error-stack/rust-toolchain.toml b/libs/error-stack/rust-toolchain.toml index 59836ac07b2..2c73c6f63e9 100644 --- a/libs/error-stack/rust-toolchain.toml +++ b/libs/error-stack/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] # Please also update the badges in `README.md`s (`error-stack` and `error-stack-macros`), and `src/lib.rs` -channel = "nightly-2025-01-08" +channel = "nightly-2025-01-13" components = ['rustfmt', 'clippy', 'llvm-tools-preview', 'miri', 'rust-src', 'rust-analyzer', 'rustc-codegen-cranelift-preview'] diff --git a/libs/error-stack/src/lib.rs b/libs/error-stack/src/lib.rs index 32d78deff35..dc9bfad0d27 100644 --- a/libs/error-stack/src/lib.rs +++ b/libs/error-stack/src/lib.rs @@ -2,7 +2,7 @@ //! //! [![crates.io](https://img.shields.io/crates/v/error-stack)][crates.io] //! [![libs.rs](https://img.shields.io/badge/libs.rs-error--stack-orange)][libs.rs] -//! [![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.83.0/nightly-2025-01-08&color=blue)][rust-version] +//! [![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.83.0/nightly-2025-01-13&color=blue)][rust-version] //! //! [crates.io]: https://crates.io/crates/error-stack //! [libs.rs]: https://lib.rs/crates/error-stack diff --git a/libs/sarif/rust-toolchain.toml b/libs/sarif/rust-toolchain.toml index 96eaf5d9f0d..f83e862502b 100644 --- a/libs/sarif/rust-toolchain.toml +++ b/libs/sarif/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2025-01-08" +channel = "nightly-2025-01-13" components = ['rustfmt', 'clippy', 'llvm-tools-preview', 'rust-analyzer', 'rustc-codegen-cranelift-preview'] diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 1f187be9bb4..699c469f6a2 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2025-01-08" +channel = "nightly-2025-01-13" components = ['rustfmt', 'clippy', 'llvm-tools-preview', 'miri', 'rust-analyzer', 'rustc-codegen-cranelift-preview'] From 367da1a6b10f7eccac970499dad9b022df161f33 Mon Sep 17 00:00:00 2001 From: Tim Diekmann <21277928+TimDiekmann@users.noreply.github.com> Date: Mon, 13 Jan 2025 09:16:20 +0100 Subject: [PATCH 2/2] Satisfy clippy --- libs/@local/harpc/client/rust/src/lib.rs | 5 +++++ libs/@local/harpc/client/rust/src/utils.rs | 4 ++++ libs/@local/harpc/net/src/session/server/transaction/mod.rs | 1 - libs/@local/harpc/server/src/utils.rs | 6 ++++++ libs/error-stack/src/ext/iter.rs | 1 - 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/libs/@local/harpc/client/rust/src/lib.rs b/libs/@local/harpc/client/rust/src/lib.rs index aafce70b478..b5a6485b6e5 100644 --- a/libs/@local/harpc/client/rust/src/lib.rs +++ b/libs/@local/harpc/client/rust/src/lib.rs @@ -100,6 +100,11 @@ impl Client { )) } + /// Connects to a target address with a custom layer. + /// + /// # Errors + /// + /// Returns a `ClientError::Connect` if unable to establish a connection to the server. pub async fn connect_with( &self, layer: L, diff --git a/libs/@local/harpc/client/rust/src/utils.rs b/libs/@local/harpc/client/rust/src/utils.rs index da545b60467..75f27e98a11 100644 --- a/libs/@local/harpc/client/rust/src/utils.rs +++ b/libs/@local/harpc/client/rust/src/utils.rs @@ -20,6 +20,10 @@ use crate::{ }; /// Encode a request of an iterator of items. +/// +/// # Errors +/// +/// Returns a `Report` if encoding the request fails. pub async fn encode_request_iter( codec: E, procedure: P, diff --git a/libs/@local/harpc/net/src/session/server/transaction/mod.rs b/libs/@local/harpc/net/src/session/server/transaction/mod.rs index d83369681db..3fab6ae0654 100644 --- a/libs/@local/harpc/net/src/session/server/transaction/mod.rs +++ b/libs/@local/harpc/net/src/session/server/transaction/mod.rs @@ -95,7 +95,6 @@ where match bytes { Ok(_) if writer.is_error() => { // we had an error previously, so just ignore the rest of the stream - continue; } Ok(bytes) => { writer.push(bytes); diff --git a/libs/@local/harpc/server/src/utils.rs b/libs/@local/harpc/server/src/utils.rs index eb869beaec9..c5f6613527c 100644 --- a/libs/@local/harpc/server/src/utils.rs +++ b/libs/@local/harpc/server/src/utils.rs @@ -39,6 +39,12 @@ where } /// Delegates a call to a closure with a single input and output. +/// +/// # Errors +/// +/// This function returns a `Report` in the following cases: +/// - If decoding the request fails +/// - If the request does not contain exactly one item pub async fn delegate_call_discrete( request: Request, codec: C, diff --git a/libs/error-stack/src/ext/iter.rs b/libs/error-stack/src/ext/iter.rs index eeb7859d4c1..f4d4f4af7fd 100644 --- a/libs/error-stack/src/ext/iter.rs +++ b/libs/error-stack/src/ext/iter.rs @@ -35,7 +35,6 @@ where (Ok(_), Some(_)) => { // we're now just consuming the iterator to return all related errors // so we can just ignore the output - continue; } (Err(error), None) => { *self.report = Some(error);