From 5b3d707d8f830e188e1f45633855b06e7851904a Mon Sep 17 00:00:00 2001 From: "Aode (lion)" Date: Tue, 7 Dec 2021 17:17:19 -0600 Subject: [PATCH] Use from_message for static error string --- crates/apub/src/fetcher/webfinger.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/apub/src/fetcher/webfinger.rs b/crates/apub/src/fetcher/webfinger.rs index 31dedf02c..e623bee22 100644 --- a/crates/apub/src/fetcher/webfinger.rs +++ b/crates/apub/src/fetcher/webfinger.rs @@ -84,9 +84,7 @@ where *request_counter += 1; if *request_counter > context.settings().http_fetch_retry_limit { - return Err(LemmyError::from(anyhow::anyhow!( - "Request retry limit reached" - ))); + return Err(LemmyError::from_message("Request retry limit reached")); } let response = retry(|| context.client().get(&fetch_url).send()).await?;