File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -107,3 +107,21 @@ it can be easy to miss that a dependency is no longer used and can be removed.
107107Trade-offs:
108108-  ✅ Faster full build and link times
109109-  ❌ May incorrectly flag dependencies as unused or miss some
110+ 
111+ ### Removing unused features from dependencies  
112+ 
113+ Recommendation: Periodically review unused features from dependencies for removal using third-party tools like
114+ [ cargo-features-manager] ( https://crates.io/crates/cargo-features-manager ) ,
115+ [ cargo-unused-features] ( https://crates.io/crates/cargo-unused-features ) .
116+ 
117+ When changing code,
118+ it can be easy to miss that a dependency's feature is no longer used and can be removed.
119+ This can reduced the number of transitive dependencies being built or
120+ reduce the amount of code within a crate being built.
121+ When removing features, extra caution is needed because features
122+ may also be used for desired behavior or performance changes
123+ which may not always be obvious from compiling or testing.
124+ 
125+ Trade-offs:
126+ -  ✅ Faster full build and link times
127+ -  ❌ May incorrectly flag features as unused
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments