chore: fix current nightly lints - #578
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The ownership changes preserve behavior, the import simplifications are equivalent, and the remaining changes are formatting-only.
Pull request overview
Updates the codebase to pass current nightly rustfmt and Clippy checks without changing APIs or behavior.
Changes:
- Simplifies five redundant
::{self}imports. - Removes six unnecessary clones by moving values into their final uses.
- Applies nightly rustfmt comment reflow.
File summaries
| File | Description |
|---|---|
src/service/users/register.rs |
Reflows comments. |
src/service/users/mod.rs |
Reflows comments. |
src/service/users/keys.rs |
Reflows comments. |
src/service/uiaa/mod.rs |
Reflows comments. |
src/service/tests/state_res/resolve.rs |
Reflows comments. |
src/service/server_keys/verify.rs |
Reflows comments. |
src/service/server_keys/keypair.rs |
Reflows comments. |
src/service/sending/sender.rs |
Moves destination into final use and reflows comments. |
src/service/sending/mod.rs |
Reflows comments. |
src/service/rooms/timeline/create.rs |
Reflows comments. |
src/service/rooms/timeline/build.rs |
Reflows comments. |
src/service/rooms/timeline/backfill.rs |
Reflows comments. |
src/service/rooms/timeline/append.rs |
Reflows comments. |
src/service/rooms/threads/mod.rs |
Reflows comments. |
src/service/rooms/state/prune.rs |
Reflows comments. |
src/service/rooms/state_res/topological_sort.rs |
Reflows comments. |
src/service/rooms/state_res/test_utils.rs |
Moves rebuilt event into its final store. |
src/service/rooms/state_res/resolve/tests.rs |
Reflows comments. |
src/service/rooms/state_res/resolve/split_conflicted.rs |
Moves owned keys and IDs instead of cloning. |
src/service/rooms/state_res/resolve/iterative_auth_check.rs |
Reflows comments. |
src/service/rooms/state_res/resolve.rs |
Reflows comments. |
src/service/rooms/state_res/event_auth/tests/room_power_levels.rs |
Reflows comments. |
src/service/rooms/state_res/event_auth/tests.rs |
Reflows comments. |
src/service/rooms/state_res/event_auth/room_member/tests.rs |
Reflows comments. |
src/service/rooms/state_res/event_auth/room_member.rs |
Reflows comments. |
src/service/rooms/state_res/event_auth.rs |
Reflows comments. |
src/service/rooms/state_cache/update.rs |
Reflows comments. |
src/service/rooms/state_accessor/server_can.rs |
Reflows comments. |
src/service/rooms/read_receipt/data.rs |
Reflows comments. |
src/service/rooms/pdu_metadata/relations.rs |
Reflows comments. |
src/service/rooms/event_handler/upgrade_outlier_pdu.rs |
Reflows comments. |
src/service/rooms/event_handler/state_at_incoming.rs |
Reflows comments. |
src/service/rooms/event_handler/outlier_state.rs |
Reflows comments. |
src/service/rooms/event_handler/handle_outlier_pdu.rs |
Reflows comments. |
src/service/rooms/event_handler/handle_incoming_pdu.rs |
Reflows comments. |
src/service/rooms/alias/mod.rs |
Reflows comments. |
src/service/resolver/tests.rs |
Reflows comments. |
src/service/resolver/actual.rs |
Reflows comments. |
src/service/presence/pipeline.rs |
Reflows comments. |
src/service/presence/mod.rs |
Reflows comments. |
src/service/presence/aggregate.rs |
Reflows comments. |
src/service/migrations/retroactively_fix_bad_data_from_roomuserid_joined.rs |
Reflows comments. |
src/service/migrations/mod.rs |
Reflows comments. |
src/service/migrations/email_bindings.rs |
Reflows comments. |
src/service/migrations/conduit.rs |
Reflows comments. |
src/service/membership/stripped_state.rs |
Reflows comments. |
src/service/membership/leave.rs |
Reflows comments. |
src/service/membership/knock.rs |
Reflows comments. |
src/service/membership/join.rs |
Reflows comments. |
src/service/media/video.rs |
Reflows comments. |
src/service/media/thumbnail.rs |
Reflows comments. |
src/service/media/remote.rs |
Reflows comments. |
src/service/media/mod.rs |
Reflows comments. |
src/service/media/migrations.rs |
Simplifies standard-library imports. |
src/service/fetcher/worker.rs |
Reflows comments. |
src/service/fetcher/tests.rs |
Reflows comments. |
src/service/fetcher/mod.rs |
Reflows comments. |
src/service/emergency/mod.rs |
Reflows comments. |
src/service/appservice/mod.rs |
Reflows comments. |
src/service/admin/mod.rs |
Reflows comments. |
src/service/admin/grant.rs |
Reflows comments. |
src/service/admin/execute.rs |
Reflows comments. |
src/router/serve/tls.rs |
Reflows comments. |
src/router/serve.rs |
Reflows comments. |
src/router/run.rs |
Reflows comments. |
src/main/tests/uiaa_ldap_origin.rs |
Reflows comments. |
src/main/tests/sync_left_foreign_state.rs |
Reflows comments. |
src/main/tests/messages_pagination_bounds.rs |
Reflows comments. |
src/main/tests/appservice_txn.rs |
Reflows comments. |
src/main/tests/admin_backup_disabled.rs |
Reflows comments. |
src/main/runtime.rs |
Reflows comments. |
src/main/logging.rs |
Reflows comments. |
src/main/health.rs |
Reflows comments. |
src/main/args.rs |
Reflows comments. |
src/macros/config.rs |
Reflows comments. |
src/database/tests.rs |
Reflows comments. |
src/database/stream.rs |
Reflows safety comments. |
src/database/pool.rs |
Reflows comments. |
src/database/map/watch.rs |
Reflows comments. |
src/database/map/open.rs |
Reflows safety comments. |
src/database/engine/db_opts.rs |
Reflows comments. |
src/database/de.rs |
Reflows comments. |
src/core/utils/unhandled.rs |
Reflows safety comments. |
src/core/utils/sys/compute.rs |
Reflows safety comments. |
src/core/utils/string/unquoted.rs |
Reflows safety comments. |
src/core/utils/content_disposition.rs |
Reflows comments. |
src/core/mods/new.rs |
Reflows safety comments. |
src/core/mods/module.rs |
Reflows safety comments. |
src/core/matrix/pdu/format/check.rs |
Reflows comments. |
src/core/matrix/event/id.rs |
Reflows comments. |
src/core/matrix/event/filter.rs |
Reflows comments. |
src/core/config/tests.rs |
Reflows comments. |
src/core/config/regenerate/write.rs |
Reflows safety comments. |
src/core/config/regenerate/tests.rs |
Reflows comments. |
src/core/config/manager.rs |
Reflows safety comments. |
src/core/config/check.rs |
Reflows comments. |
src/api/server/send_join.rs |
Reflows comments. |
src/api/router/state.rs |
Reflows safety comments. |
src/api/router/auth/uiaa.rs |
Reflows comments. |
src/api/oidc/userinfo.rs |
Reflows comments. |
src/api/oidc/token.rs |
Reflows comments. |
src/api/oidc/registration.rs |
Reflows comments. |
src/api/oidc/native.rs |
Reflows comments. |
src/api/oidc/device/consent.rs |
Reflows comments. |
src/api/oidc/complete.rs |
Reflows comments. |
src/api/oidc/authorize.rs |
Reflows comments. |
src/api/oidc/account/session_view.rs |
Reflows comments. |
src/api/oidc/account/session_list.rs |
Reflows comments. |
src/api/oidc/account.rs |
Reflows comments. |
src/api/client/well_known.rs |
Simplifies discovery import. |
src/api/client/user_directory.rs |
Simplifies user-directory import. |
src/api/client/sync/v5/rooms.rs |
Reflows comments. |
src/api/client/sync/v3.rs |
Reflows comments. |
src/api/client/space.rs |
Reflows comments. |
src/api/client/session/sso.rs |
Reflows comments. |
src/api/client/session/mod.rs |
Reflows comments. |
src/api/client/session/ldap.rs |
Reflows comments. |
src/api/client/send.rs |
Simplifies utility imports. |
src/api/client/room/upgrade.rs |
Reflows comments. |
src/api/client/room/create.rs |
Reflows comments. |
src/api/client/register/register.rs |
Reflows comments. |
src/api/client/register/available.rs |
Reflows comments. |
src/api/client/push/pushrules.rs |
Reflows comments. |
src/api/client/push/pushrules_global.rs |
Reflows comments. |
src/api/client/membership/members.rs |
Simplifies membership import. |
src/api/client/membership/invite.rs |
Reflows comments. |
src/api/client/media.rs |
Reflows comments. |
src/api/client/keys/upload_signing_keys.rs |
Reflows comments. |
src/api/client/keys/claim_keys.rs |
Reflows comments. |
src/api/client/capabilities.rs |
Reflows comments. |
src/api/client/alias/directory_room.rs |
Reflows comments. |
src/api/client/admin/users/create_or_modify.rs |
Reflows comments. |
src/api/client/admin/users/account_data.rs |
Reflows comments. |
src/api/client/admin/rooms/list_rooms.rs |
Reflows comments. |
src/api/client/admin/register.rs |
Reflows comments. |
src/api/client/account/3pid/request_password_change_token_via_email.rs |
Reflows comments. |
src/admin/room/list.rs |
Reflows comments. |
Review details
- Files reviewed: 137/137 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Hi @basnijholt, it looks like Instead of reformatting 137 files, try setting Sorry about our bleeding-edge lifestyle here, but it does have its merits. |
09684b6 to
958a091
Compare
|
Set I kept the six redundant-clone fixes alongside the five import cleanups because those clones also cause fatal errors in the nightly Clippy jobs. The required clones are unchanged. Rebuilt this as one commit and force-pushed. Fresh formatting checks pass with the pinned development formatter and both September 5 and September 6 nightlies; stable and nightly Clippy pass too. The isolated test run passed 1,078 tests, with four existing ignored tests. |
While checking CI on #576 and #577, I reproduced the nightly formatting and Clippy failures on unmodified current
main. They are shared baseline failures, so I'm keeping the cleanup in its own PR instead of adding it to either feature patch.This sets
wrap_comments = falseinrustfmt.toml, so the new nightly formatter leaves the existing comment layout alone. The original comment reflow has been removed from the diff; there are now nine changed files.The remaining source changes simplify five imports ending in
::{self}and remove six clones flagged by nightly Clippy. Each removed clone was at the value's final use. The clones still needed across state-resolution iterations and for the sending transaction status map remain in place. No toolchain pin or new lint allowances are added.Verified locally on aarch64 Linux after this revision:
cargo fmt --all -- --checkwith the formatter from the pinned development shell, nightly-2026-09-05, and nightly-2026-09-06.-D warningsacross all workspace targets and all features: Rust 1.95.0, nightly-2026-09-05, and nightly-2026-09-06. Both nightly runs use CI's test profile and existing solver/unstable-feature flags.cargo test --offline --locked --workspace --all-targets --all-features: 1,078 passed, zero failed, four existing ignored tests; benchmark smoke checks passed too. Server tests used isolated local databases and loopback networking.tuwunel-example.tomlare unchanged frommain.I haven't run Complement locally; no protocol or compliance change is intended.