continuwuity/src/service/rooms
ember33 dd1e9f0979 refactor(spaces): fix clippy, extract testable functions, improve test coverage
Fix all clippy warnings in space roles files: dangerous `as` casts,
`to_string()` on &str, format string inlining, items-after-statements,
needless borrows, large futures, semicolons outside blocks, and
let-else patterns.

Extract `compute_user_power_level` and `roles_satisfy_requirements` as
pure free functions so the core logic can be unit-tested without async
service dependencies. Update all tests in tests.rs and
integration_tests.rs to call the real extracted functions instead of
reimplementing the logic inline.

Add negative deserialization tests for RoleDefinition,
SpaceRoleMemberEventContent, and SpaceRoleRoomEventContent. Improve
doc comments on handle_* methods and add module-level documentation to
cache_tests.rs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 11:53:11 +01:00
..
alias fix(rooms): prevent removing admin room alias 2026-03-04 15:05:24 +00:00
auth_chain refactor: Make stream utils generic over the error type 2026-02-23 16:36:46 +00:00
directory run cargo fix for rust 2024 changes and rustfmt 2025-02-23 01:17:45 -05:00
event_handler fix: make dropped PDU warning less useless 2026-03-04 14:58:01 +00:00
lazy_loading fix(sync/v3): Further cleanup + improve incremental sync consistency 2025-12-07 19:58:24 +00:00
metadata run cargo fix for rust 2024 changes and rustfmt 2025-02-23 01:17:45 -05:00
outlier Post-formatting aesthetic and spacing corrections 2025-07-02 19:17:06 +01:00
pdu_metadata fix: Simplify visibility check code 2025-12-21 17:12:36 +00:00
read_receipt refactor(sync/v3): Split load_joined_room into smaller functions 2025-12-07 19:58:24 +00:00
roles refactor(spaces): fix clippy, extract testable functions, improve test coverage 2026-03-18 11:53:11 +01:00
search fix: Add aggregations to the search endpoint 2025-12-21 17:12:34 +00:00
short chore: Clippy fixes 2025-12-07 19:58:24 +00:00
spaces fix: Omit children with invalid state from space summary 2025-12-18 19:48:58 +00:00
state fix: Properly sync left rooms 2025-12-07 19:58:24 +00:00
state_accessor feat: Implement a migration to fix busted local invites 2026-02-10 02:29:11 +00:00
state_cache fix: Properly set stripped state for local invites 2026-02-10 02:29:11 +00:00
state_compressor fix(sync/v3): Further cleanup + improve incremental sync consistency 2025-12-07 19:58:24 +00:00
threads refactor: Promote handling unsigned data out of timeline 2025-12-21 17:12:33 +00:00
timeline refactor(spaces): fix clippy, extract testable functions, improve test coverage 2026-03-18 11:53:11 +01:00
typing feat: Typing notifications in simplified sliding sync 2025-12-07 19:58:24 +00:00
user run cargo fix for rust 2024 changes and rustfmt 2025-02-23 01:17:45 -05:00
mod.rs feat(spaces): add space roles service for permission cascading 2026-03-17 16:54:19 +01:00