fix(spaces): fix clippy semicolon_outside_block, add type alias for complex type
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Failing after 5s
Update flake hashes / update-flake-hashes (pull_request) Failing after 6s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 6s
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Failing after 5s
Update flake hashes / update-flake-hashes (pull_request) Failing after 6s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 6s
This commit is contained in:
parent
5cc90faa42
commit
8494d1d65b
1 changed files with 9 additions and 8 deletions
|
|
@ -47,13 +47,12 @@ pub async fn flush_space_from_cache(&self, space_id: &RoomId) {
|
||||||
self.roles.write().await.remove(space_id);
|
self.roles.write().await.remove(space_id);
|
||||||
self.user_roles.write().await.remove(space_id);
|
self.user_roles.write().await.remove(space_id);
|
||||||
self.room_requirements.write().await.remove(space_id);
|
self.room_requirements.write().await.remove(space_id);
|
||||||
{
|
|
||||||
let mut room_to_space = self.room_to_space.write().await;
|
let mut room_to_space = self.room_to_space.write().await;
|
||||||
room_to_space.retain(|_, parents| {
|
room_to_space.retain(|_, parents| {
|
||||||
parents.remove(space_id);
|
parents.remove(space_id);
|
||||||
!parents.is_empty()
|
!parents.is_empty()
|
||||||
});
|
});
|
||||||
}
|
drop(room_to_space);
|
||||||
self.space_to_rooms.write().await.remove(space_id);
|
self.space_to_rooms.write().await.remove(space_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -767,7 +766,9 @@ pub async fn validate_pl_change(
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
let space_data: Vec<(Vec<(OwnedUserId, HashSet<String>)>, BTreeMap<String, RoleDefinition>)> = {
|
type SpaceEnforcementData =
|
||||||
|
(Vec<(OwnedUserId, HashSet<String>)>, BTreeMap<String, RoleDefinition>);
|
||||||
|
let space_data: Vec<SpaceEnforcementData> = {
|
||||||
let roles_guard = self.roles.read().await;
|
let roles_guard = self.roles.read().await;
|
||||||
let user_roles_guard = self.user_roles.read().await;
|
let user_roles_guard = self.user_roles.read().await;
|
||||||
parent_spaces
|
parent_spaces
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue