Skip to content

Commit fb36f58

Browse files
committed
Fix typos
1 parent d9035d0 commit fb36f58

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

crates/emmylua_code_analysis/src/semantic/cache/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub struct LuaInferCache {
2525
pub flow_node_cache: HashMap<(VarRefId, FlowId), CacheEntry<LuaType>>,
2626
pub index_ref_origin_type_cache: HashMap<VarRefId, CacheEntry<LuaType>>,
2727
pub expr_var_ref_id_cache: HashMap<LuaSyntaxId, VarRefId>,
28-
pub narrow_by_literal_stop_postion_cache: HashSet<LuaSyntaxId>,
28+
pub narrow_by_literal_stop_position_cache: HashSet<LuaSyntaxId>,
2929
}
3030

3131
impl LuaInferCache {
@@ -38,7 +38,7 @@ impl LuaInferCache {
3838
flow_node_cache: HashMap::new(),
3939
index_ref_origin_type_cache: HashMap::new(),
4040
expr_var_ref_id_cache: HashMap::new(),
41-
narrow_by_literal_stop_postion_cache: HashSet::new(),
41+
narrow_by_literal_stop_position_cache: HashSet::new(),
4242
}
4343
}
4444

crates/emmylua_code_analysis/src/semantic/infer/narrow/condition_flow/binary_flow.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ fn maybe_field_literal_eq_narrow(
394394

395395
if maybe_var_ref_id != *var_ref_id {
396396
if cache
397-
.narrow_by_literal_stop_postion_cache
397+
.narrow_by_literal_stop_position_cache
398398
.contains(&syntax_id)
399399
{
400400
if var_ref_id.start_with(&maybe_var_ref_id) {
@@ -415,7 +415,9 @@ fn maybe_field_literal_eq_narrow(
415415
return Ok(ResultTypeOrContinue::Continue);
416416
};
417417

418-
cache.narrow_by_literal_stop_postion_cache.insert(syntax_id);
418+
cache
419+
.narrow_by_literal_stop_position_cache
420+
.insert(syntax_id);
419421

420422
let right_type = infer_expr(db, cache, LuaExpr::LiteralExpr(literal_expr))?;
421423
let mut guard = InferGuard::new();

0 commit comments

Comments
 (0)