Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Mar 22, 2024
1 parent 5223a09 commit 79ac276
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
6 changes: 1 addition & 5 deletions src/code_info/classlike_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ use indexmap::IndexMap;
use serde::{Deserialize, Serialize};

use crate::{
attribute_info::AttributeInfo, class_constant_info::ConstantInfo, enum_case_info::EnumCaseInfo,
property_info::PropertyInfo,
attribute_info::AttributeInfo, class_constant_info::ConstantInfo, property_info::PropertyInfo,
};

#[derive(Clone, Debug, Serialize, Deserialize)]
Expand Down Expand Up @@ -188,8 +187,6 @@ pub struct ClassLikeInfo {

pub attributes: Vec<AttributeInfo>,

pub enum_cases: Option<FxHashMap<String, EnumCaseInfo>>,

pub enum_type: Option<TAtomic>,
pub enum_constraint: Option<Box<TAtomic>>,

Expand Down Expand Up @@ -242,7 +239,6 @@ impl ClassLikeInfo {
direct_parent_interfaces: vec![],
required_classlikes: vec![],
inheritable_method_ids: FxHashMap::default(),
enum_cases: None,
enum_type: None,
enum_constraint: None,
hash: None,
Expand Down
2 changes: 1 addition & 1 deletion src/code_info_builder/classlike_scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ pub(crate) fn scan(
*class_name,
&mut storage,
file_source.comments,
&file_source,
file_source,
user_defined,
);

Expand Down
16 changes: 7 additions & 9 deletions src/file_scanner_analyzer/scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,15 +613,13 @@ fn invalidate_changed_codebase_elements(
Some(kind) => {
if let SymbolKind::TypeDefinition = kind {
codebase.type_definitions.remove(&ast_node.name);
} else {
if let Some(classlike_info) =
codebase.classlike_infos.remove(&ast_node.name)
{
for method_name in classlike_info.methods {
codebase
.functionlike_infos
.remove(&(ast_node.name, method_name));
}
} else if let Some(classlike_info) =
codebase.classlike_infos.remove(&ast_node.name)
{
for method_name in classlike_info.methods {
codebase
.functionlike_infos
.remove(&(ast_node.name, method_name));
}
}
}
Expand Down

0 comments on commit 79ac276

Please sign in to comment.