chore: remove unnecessary params

This commit is contained in:
Shunsuke Shibayama 2023-03-03 10:01:05 +09:00
parent 1deb0c4788
commit 5c6ea316f5
13 changed files with 220 additions and 372 deletions

View file

@ -261,7 +261,6 @@ pub fn __array_getitem__(mut args: ValueArgs, ctx: &Context) -> EvalValueResult<
}
pub fn __dict_getitem__(mut args: ValueArgs, ctx: &Context) -> EvalValueResult<ValueObj> {
let allow_cast = true;
let slf = args.remove_left_or_key("Self").unwrap();
let slf = enum_unwrap!(slf, ValueObj::Dict);
let index = args.remove_left_or_key("Index").unwrap();
@ -269,7 +268,7 @@ pub fn __dict_getitem__(mut args: ValueArgs, ctx: &Context) -> EvalValueResult<V
for (k, v) in slf.iter() {
match (&index, k) {
(ValueObj::Type(idx), ValueObj::Type(kt)) => {
if ctx.subtype_of(idx.typ(), kt.typ(), allow_cast) {
if ctx.subtype_of(idx.typ(), kt.typ()) {
return Some(v);
}
}