]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/lib.rs
Fixing broken SQL migration formatting. (#3800)
[lemmy.git] / crates / apub / src / lib.rs
index e920e05df36ccb5c6040c34c70fac3efd5e73020..d4e34f9e740fd2bb3b444b759ec7e985c9841c93 100644 (file)
@@ -78,7 +78,7 @@ fn check_apub_id_valid(apub_id: &Url, local_site_data: &LocalSiteData) -> Result
     .map(|l| l.federation_enabled)
     .unwrap_or(true)
   {
-    return Err(LemmyErrorType::FederationDisabled)?;
+    Err(LemmyErrorType::FederationDisabled)?;
   }
 
   if local_site_data
@@ -86,7 +86,7 @@ fn check_apub_id_valid(apub_id: &Url, local_site_data: &LocalSiteData) -> Result
     .iter()
     .any(|i| domain.eq(&i.domain))
   {
-    return Err(LemmyErrorType::DomainBlocked(domain))?;
+    Err(LemmyErrorType::DomainBlocked(domain.clone()))?;
   }
 
   // Only check this if there are instances in the allowlist
@@ -96,7 +96,7 @@ fn check_apub_id_valid(apub_id: &Url, local_site_data: &LocalSiteData) -> Result
       .iter()
       .any(|i| domain.eq(&i.domain))
   {
-    return Err(LemmyErrorType::DomainNotInAllowList(domain))?;
+    Err(LemmyErrorType::DomainNotInAllowList(domain))?;
   }
 
   Ok(())