mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 15:14:32 +00:00
Remove clippy errors
This commit is contained in:
parent
5ece296adf
commit
e5e6221873
1 changed files with 5 additions and 8 deletions
|
@ -758,6 +758,8 @@ pub enum RatomlFileKind {
|
|||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
// FIXME @alibektas : Seems like a clippy warning of this sort should tell that combining different ConfigInputs into one enum was not a good idea.
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
enum RatomlFile {
|
||||
Workspace(GlobalLocalConfigInput),
|
||||
Crate(LocalConfigInput),
|
||||
|
@ -2598,14 +2600,9 @@ macro_rules! _impl_for_config_data {
|
|||
$vis fn $field(&self, source_root : Option<SourceRootId>) -> &$ty {
|
||||
let mut source_root = source_root.as_ref();
|
||||
while let Some(sr) = source_root {
|
||||
if let Some((file, _)) = self.ratoml_file.get(&sr) {
|
||||
match file {
|
||||
RatomlFile::Workspace(config) => {
|
||||
if let Some(v) = config.global.$field.as_ref() {
|
||||
return &v;
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
if let Some((RatomlFile::Workspace(config), _)) = self.ratoml_file.get(&sr) {
|
||||
if let Some(v) = config.global.$field.as_ref() {
|
||||
return &v;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue