Use from_message for static error string

This commit is contained in:
Aode (lion) 2021-12-07 17:17:19 -06:00
parent 2cf3278724
commit 5b3d707d8f

View 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?;