You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you call a native method from Andy C code that requires a usize you get a pretty unhelpful error if the integer value could not be converted into a usize because it was negative.
[1,2,3].truncate(-1);
Results in the unhelpful error:
cannot convert argument to native type: failed to convert from int because of: 'out of range integral type conversion attempted'
A more helpful error would point out that negative numbers aren't allowed here.
The text was updated successfully, but these errors were encountered:
When you call a native method from Andy C code that requires a
usize
you get a pretty unhelpful error if the integer value could not be converted into a usize because it was negative.Results in the unhelpful error:
A more helpful error would point out that negative numbers aren't allowed here.
The text was updated successfully, but these errors were encountered: