From 8852dc321822fe26b5cc84b2333904c897aff70a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 8 Nov 2024 21:36:59 -0500 Subject: [PATCH 1/4] Prevent upload-artifact from causing CI failure This step has been failing way more than reasonable across my various repos. With the provided path, there will be 1 file uploaded Artifact name is valid! Root directory input is valid! Attempt 1 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact. Retrying request in 3000 ms... Attempt 2 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact. Retrying request in 6029 ms... Attempt 3 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact. Retrying request in 8270 ms... Attempt 4 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact. Retrying request in 12577 ms... Error: Failed to CreateArtifact: Failed to make request after 5 attempts: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/CreateArtifact --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ae4522..8860e47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,7 @@ jobs: with: name: Cargo.lock path: Cargo.lock + continue-on-error: true build: name: Rust ${{matrix.rust}} From cc2cecb428b4eeb35ffb332d1f878f210a1e3fa3 Mon Sep 17 00:00:00 2001 From: Andres Suarez Date: Tue, 3 Dec 2024 13:45:39 -0500 Subject: [PATCH 2/4] Fix anyhow::Ok rustdoc code formatting --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index c6dd4ce..7124eb0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -627,11 +627,11 @@ pub trait Context: context::private::Sealed { F: FnOnce() -> C; } -/// Equivalent to Ok::<_, anyhow::Error>(value). +/// Equivalent to `Ok::<_, anyhow::Error>(value)`. /// -/// This simplifies creation of an anyhow::Result in places where type inference -/// cannot deduce the `E` type of the result — without needing to write -/// `Ok::<_, anyhow::Error>(value)`. +/// This simplifies creation of an `anyhow::Result` in places where type +/// inference cannot deduce the `E` type of the result — without needing +/// to write`Ok::<_, anyhow::Error>(value)`. /// /// One might think that `anyhow::Result::Ok(value)` would work in such cases /// but it does not. From 863791a66d1b2d3033e111930684214f41ed0220 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 3 Dec 2024 11:00:19 -0800 Subject: [PATCH 3/4] Align naming between Ok function argument and its documentation The documentation refers to `Ok::<_, anyhow::Error>(value)`. ^^^^^ --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7124eb0..7da01dd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -646,8 +646,8 @@ pub trait Context: context::private::Sealed { /// | consider giving this pattern the explicit type `std::result::Result`, where the type parameter `E` is specified /// ``` #[allow(non_snake_case)] -pub fn Ok(t: T) -> Result { - Result::Ok(t) +pub fn Ok(value: T) -> Result { + Result::Ok(value) } // Not public API. Referenced by macro-generated code. From 8ceb5e988fcae18270745e291efb8bd716c25bf0 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 3 Dec 2024 11:02:58 -0800 Subject: [PATCH 4/4] Release 1.0.94 --- Cargo.toml | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0cd83c5..4b2c7ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "anyhow" -version = "1.0.93" +version = "1.0.94" authors = ["David Tolnay "] categories = ["rust-patterns", "no-std"] description = "Flexible concrete Error type built on std::error::Error" diff --git a/src/lib.rs b/src/lib.rs index 7da01dd..d3d0767 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -206,7 +206,7 @@ //! function that returns Anyhow's error type, as the trait that `?`-based error //! conversions are defined by is only available in std in those old versions. -#![doc(html_root_url = "https://docs.rs/anyhow/1.0.93")] +#![doc(html_root_url = "https://docs.rs/anyhow/1.0.94")] #![cfg_attr(error_generic_member_access, feature(error_generic_member_access))] #![no_std] #![deny(dead_code, unused_imports, unused_mut)]