We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c98958e commit 1bbbd3eCopy full SHA for 1bbbd3e
1 file changed
vm/src/stdlib/itertools.rs
@@ -1985,9 +1985,9 @@ mod decl {
1985
if n.lt(&BigInt::one()) {
1986
return Err(vm.new_value_error("n must be at least one".to_owned()));
1987
}
1988
- let n = n
1989
- .to_usize()
1990
- .ok_or(vm.new_value_error("Python int too large to convert to usize".to_owned()))?;
+ let n = n.to_usize().ok_or(
+ vm.new_overflow_error("Python int too large to convert to usize".to_owned()),
+ )?;
1991
let iterable = iterable_ref.get_iter(vm)?;
1992
1993
Self {
0 commit comments