fix: collapse nested if for clippy
Some checks failed
CI / Check / Test (push) Has been cancelled

This commit is contained in:
2026-07-10 23:20:49 +02:00
parent 8aa64ab174
commit c3d8bcad29

View File

@@ -904,13 +904,13 @@ impl SocialCommand for InMemorySocialRepository {
actor_url: h.clone(),
},
};
if let SocialIdentity::Local(target_id) = &identity {
if follower == target_id {
if let SocialIdentity::Local(target_id) = &identity
&& follower == target_id
{
return Err(DomainError::ValidationError(
"Cannot follow yourself".into(),
));
}
}
let mut store = self.follows.lock().unwrap();
let already = store
.iter()