Use typed constant index conversion in script validation

Assisted-by: OpenAI Codex:model identifier unavailable
This commit is contained in:
dot committed 2026-10-12 22:00:59 +09:00
1 parent 1f1fe045bb
commit a2dacaf4bd
1 file changed
+1 -1
+1 -1
View File
@@ -843,7 +843,7 @@ pub(crate) fn code_returns_only_none(code: &Py<PyCode>) -> bool {
Instruction::LoadCommonConstant { idx } => idx.get(arg) == CommonConstant::None,
Instruction::LoadConst { consti } => code
.constants
.get(consti.get(arg) as usize)
.get(usize::from(consti.get(arg)))
.is_some_and(|value| matches!(value.borrow_constant(), BorrowedConstant::None)),
_ => false,
};