#[allow(unreachable_code, unused_variables)] used to paper over cfg branching
- Dominant language
- Rust
- Stars
- 0
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
`handle_persist_direct_message` and `handle_get_paginated_messages` use `#[allow(unreachable_code, unused_variables)]` because the `mongo_db` and `persistence` feature blocks both return and the compiler sees one as unreachable.
hint: Use #[cfg] / #[cfg(not(...))] on the function body blocks properly, or split into separate _mongo / _grpc methods behind a dispatching wrapper. This removes the need for suppressed warnings and makes it explicit which backend runs when.
Contributor guide
Research direction
Locate handle_persist_direct_message and handle_get_paginated_messages, then inspect their mongo_db and persistence feature blocks and the surrounding dispatch logic. Compare the suggested cfg-based body blocks with separate _mongo and _grpc methods; done means the backend choice is explicit and the unreachable_code and unused_variables suppressions are removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100