Skip to content

Commit af02f45

Browse files
committed
small fix
1 parent acaa546 commit af02f45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rust_core.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl IFn for NthFn {
177177
fn invoke(&self, args: Vec<&Value>) -> Value {
178178
// @TODO generalize arity exceptions, and other exceptions
179179
if args.len() != 2 {
180-
return error_message::wrong_arg_count(2, args.len())
180+
return error_message::wrong_varg_count(&[2,3], args.len())
181181
}
182182
// @TODO change iteration to work with Value references, or even change invoke to work on Rc<..>
183183
// as we do everything else; surely we don't want to clone just to read from a collection
@@ -209,7 +209,7 @@ impl IFn for NthFn {
209209
_ => error_message::type_mismatch(TypeTag::ISeq, args.get(0)),
210210
}
211211
} else {
212-
error_message::type_mismatch(TypeTag::Integer, args.get(0))
212+
error_message::type_mismatch(TypeTag::Integer, args.get(1))
213213
}
214214
}
215215
}

0 commit comments

Comments
 (0)