From: Aode (lion) Date: Tue, 7 Dec 2021 23:17:19 +0000 (-0600) Subject: Use from_message for static error string X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%7B%7D/%22%7Burl%7D/%7BpictrsAvatarThumbnail%28?a=commitdiff_plain;h=5b3d707d8f830e188e1f45633855b06e7851904a;p=lemmy.git Use from_message for static error string --- diff --git a/crates/apub/src/fetcher/webfinger.rs b/crates/apub/src/fetcher/webfinger.rs index 31dedf02..e623bee2 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?;