Skip to content

Commit c48d23f

Browse files
committed
fmt
1 parent d0437e2 commit c48d23f

3 files changed

Lines changed: 10 additions & 13 deletions

File tree

crates/emmylua_code_analysis/src/db_index/reference/mod.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,8 @@ impl LuaReferenceIndex {
111111
.get_decl_references(decl_id)
112112
}
113113

114-
pub fn get_var_reference_decl(
115-
&self,
116-
file_id: &FileId,
117-
range: TextRange,
118-
) -> Option<LuaDeclId> {
119-
self.file_references
120-
.get(file_id)?
121-
.get_decl_id(&range)
114+
pub fn get_var_reference_decl(&self, file_id: &FileId, range: TextRange) -> Option<LuaDeclId> {
115+
self.file_references.get(file_id)?.get_decl_id(&range)
122116
}
123117

124118
pub fn get_decl_references_map(

crates/emmylua_code_analysis/src/semantic/infer/infer_name/narrow/get_type_at_flow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub fn get_type_at_flow(
9090
FlowNodeKind::FalseCondition(_) => {
9191
// todo support
9292
antecedent_flow_id = get_single_antecedent(tree, flow_node)?;
93-
},
93+
}
9494
FlowNodeKind::ForIStat(_) => {
9595
// todo check for `for i = 1, 10 do end`
9696
antecedent_flow_id = get_single_antecedent(tree, flow_node)?;

crates/emmylua_code_analysis/src/semantic/infer/infer_name/narrow/mod.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
mod get_type_at_flow;
21
mod get_type_at_cast_flow;
32
mod get_type_at_condition_flow;
3+
mod get_type_at_flow;
44

55
use emmylua_parser::{LuaAstNode, LuaChunk, LuaNameExpr};
66

77
use crate::{
8-
infer_param, semantic::infer::{
8+
infer_param,
9+
semantic::infer::{
910
infer_name::{infer_global_type, narrow::get_type_at_flow::get_type_at_flow},
1011
InferResult,
11-
}, DbIndex, FlowAntecedent, FlowId, FlowNode, FlowTree, InferFailReason, LuaDeclId, LuaInferCache, LuaType
12+
},
13+
DbIndex, FlowAntecedent, FlowId, FlowNode, FlowTree, InferFailReason, LuaDeclId, LuaInferCache,
14+
LuaType,
1215
};
1316

1417
pub fn infer_name_expr_narrow_type(
@@ -77,4 +80,4 @@ fn get_single_antecedent(tree: &FlowTree, flow: &FlowNode) -> Result<FlowId, Inf
7780
pub enum ResultTypeOrContinue {
7881
Result(LuaType),
7982
Continue,
80-
}
83+
}

0 commit comments

Comments
 (0)