File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
src/tools/rust-analyzer/crates/rust-analyzer/src Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -758,6 +758,8 @@ pub enum RatomlFileKind {
758758}
759759
760760#[ 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) ]
761763enum RatomlFile {
762764 Workspace ( GlobalLocalConfigInput ) ,
763765 Crate ( LocalConfigInput ) ,
@@ -2598,14 +2600,9 @@ macro_rules! _impl_for_config_data {
25982600 $vis fn $field( & self , source_root : Option <SourceRootId >) -> & $ty {
25992601 let mut source_root = source_root. as_ref( ) ;
26002602 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;
26092606 }
26102607 }
26112608
You can’t perform that action at this time.
0 commit comments