Skip to main content

Module redundant_definitions

Module redundant_definitions 

Source
Expand description

Detects “thin wrapper” definitions — functions whose entire body is a single call to another function with one literal default argument (e.g. pub fn record_X(&self) { self.record_X_for_session(None) }).

This is a syntactic-only detector that catches the exact pattern flagged by self-dogfooding in v1.13.0 Phase 1-A: 16 record_* wrappers all forwarding to their _for_session(None) substrate. The substrate could be flagged by find_dead_code_v2 only AFTER the wrappers were removed, so this complement helps surface the cluster pre-deletion.

Structs§

RedundantDefinitionEntry

Functions§

find_redundant_definitions
Finds Rust one-line wrappers in the project.