refactor: Arc attribute cache, const fn, let-chain cleanup#373
Conversation
- Wrap AttributeCache entries in Arc<Vec> for O(1) clone on cache get - Update AttributeStore and callers for Arc<Vec> return type - Use std::mem::size_of_val in rs_array_new for correctness - Flatten nested if-let into let-chains in utilize_index and index/mod - Mark int_loses_f64_precision and is_indexable as const fn - Use is_none_or instead of map_or(true, ...) in node_by_index_scan Split from #359.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 14 minutes and 48 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #373 +/- ##
==========================================
- Coverage 84.14% 84.13% -0.01%
==========================================
Files 110 110
Lines 28954 28963 +9
==========================================
+ Hits 24362 24368 +6
- Misses 4592 4595 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Split from #359.
AttributeCacheentries inArc<Vec>for O(1) clone on cache get (avoids full Vec heap allocation per lookup)AttributeStore,Graph, andreply.rscallers for newArc<Vec>return typestd::mem::size_of_valinrs_array_newfor correctnessif-letinto let-chains inutilize_indexandindex/modint_loses_f64_precisionandis_indexableasconst fnis_none_orinstead ofmap_or(true, ...)innode_by_index_scanTest plan
cargo checkpassescargo test -p graphpasses