]> Untitled Git - lemmy.git/commitdiff
Use from_message for static error string
authorAode (lion) <asonix@asonix.dog>
Tue, 7 Dec 2021 23:17:19 +0000 (17:17 -0600)
committerAode (lion) <asonix@asonix.dog>
Tue, 7 Dec 2021 23:17:19 +0000 (17:17 -0600)
crates/apub/src/fetcher/webfinger.rs

index 31dedf02c9a0c3db674f0d96ae9424b6a6c455f4..e623bee22496df70542a7f537f6b91e1e19a734a 100644 (file)
@@ -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?;