Skip to content

Commit dc471c1

Browse files
committed
Remove clippy errors
1 parent 45ef4f2 commit dc471c1

File tree

1 file changed

+5
-8
lines changed
  • src/tools/rust-analyzer/crates/rust-analyzer/src

1 file changed

+5
-8
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff 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)]
761763
enum 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

0 commit comments

Comments
 (0)