File tree 1 file changed +5
-8
lines changed
src/tools/rust-analyzer/crates/rust-analyzer/src
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -758,6 +758,8 @@ pub enum RatomlFileKind {
758
758
}
759
759
760
760
#[ derive( Debug , Clone ) ]
761
+ // FIXME @alibektas : Seems like a clippy warning of this sort should tell that combining different ConfigInputs into one enum was not a good idea.
762
+ #[ allow( clippy:: large_enum_variant) ]
761
763
enum RatomlFile {
762
764
Workspace ( GlobalLocalConfigInput ) ,
763
765
Crate ( LocalConfigInput ) ,
@@ -2598,14 +2600,9 @@ macro_rules! _impl_for_config_data {
2598
2600
$vis fn $field( & self , source_root : Option <SourceRootId >) -> & $ty {
2599
2601
let mut source_root = source_root. as_ref( ) ;
2600
2602
while let Some ( sr) = source_root {
2601
- if let Some ( ( file, _) ) = self . ratoml_file. get( & sr) {
2602
- match file {
2603
- RatomlFile :: Workspace ( config) => {
2604
- if let Some ( v) = config. global. $field. as_ref( ) {
2605
- return & v;
2606
- }
2607
- } ,
2608
- _ => ( )
2603
+ if let Some ( ( RatomlFile :: Workspace ( config) , _) ) = self . ratoml_file. get( & sr) {
2604
+ if let Some ( v) = config. global. $field. as_ref( ) {
2605
+ return & v;
2609
2606
}
2610
2607
}
2611
2608
You can’t perform that action at this time.
0 commit comments