Skip to content

fix clippy warning #5442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged

fix clippy warning #5442

merged 1 commit into from
Mar 24, 2025

Conversation

jstarry
Copy link

@jstarry jstarry commented Mar 24, 2025

Problem

Warning popped up after 2c0861e

warning: link reference defined in list item                                                                                                                                                                          
    --> ledger/src/blockstore.rs:1208:13                                                                                                                                                                              
     |                                                                                                                                                                                                                
1208 |     ///   - [`cf::Index`]: stores (slot id, index to the index_working_set_entry)                                                                                                                              
     |             ^^^^^^^^^^^^^                                                                                                                                                                                      
     |                                                                                                                                                                                                                
     = help: link definitions are not shown in rendered documentation                                                                                                                                                 
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_nested_refdefs                                                                                               
     = note: `#[warn(clippy::doc_nested_refdefs)]` on by default                                                                                                                                                      
help: for an intra-doc link, add `[]` between the label and the colon                                                                                                                                                 
     |                                                                                                                                                                                                                
1208 |     ///   - [`cf::Index`][]: stores (slot id, index to the index_working_set_entry)                                                                                                                            
     |                          ++                                                                                                                                                                                    
                                                                                                                                                                                                                      
warning: `solana-ledger` (lib) generated 1 warning                                                                                                                                                                    

Summary of Changes

Fix warning

Fixes #

@jstarry jstarry requested review from yihau and steviez March 24, 2025 15:25
@jstarry
Copy link
Author

jstarry commented Mar 24, 2025

Kinda interesting that clippy only complained about one instance of this pattern. Rather than "fixing" all instances, I just fixed the one clippy complained about. From the issue it seems that not all nested items will be rendered as a link reference: rust-lang/rust#133150

Copy link

@steviez steviez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda interesting that clippy only complained about one instance of this pattern. Rather than "fixing" all instances, I just fixed the one clippy complained about ...

I also find this kind of bizarre, but agree with your decision to only fix what clippy complained about

@jstarry jstarry merged commit a2af443 into anza-xyz:master Mar 24, 2025
44 of 47 checks passed
@jstarry jstarry deleted the fix/clippy branch March 24, 2025 16:07
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.3%. Comparing base (fca33f0) to head (c781ff0).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #5442     +/-   ##
=========================================
- Coverage    83.3%    83.3%   -0.1%     
=========================================
  Files         820      820             
  Lines      371809   371809             
=========================================
- Hits       310084   310043     -41     
- Misses      61725    61766     +41     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants