iiitl / iiitl/PerOXO

#[allow(unreachable_code, unused_variables)] used to paper over cfg branching

Open
#7 4 comments 0 reactions 0 assignees View on GitHub
bug easy
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.