refactor: replace DeviceRow positional tuple with named struct - #434
Conversation
Replace the 19-element positional tuple with a Diesel Queryable struct so fields are accessed by name (row.lid) instead of position. This reduces the risk of mix-ups when adding new columns to the device table.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRefactored the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
DeviceRowwith a#[derive(Queryable)]named structrow.lid,row.push_name) instead of position in a tuple destructureThis reduces the risk of field mix-ups when adding new columns to the device table (e.g., the upcoming
nct_saltcolumn in #433).Test plan
cargo clippy --all --tests— cleancargo test -p whatsapp-rust-sqlite-storage— all 19 tests passSummary by CodeRabbit