Open fintelia opened 8 months ago
The documentation for ByteOrder::write_int says:
ByteOrder::write_int
If n is not representable in nbytes, or if nbytes is > 8, then this method panics.
However, passing inputs that fail the first condition doesn't actually cause a panic:
BigEndian::write_int(&mut [0; 8], 99999999, 1); // Doesn't panic BigEndian::write_int(&mut [0; 8], -99999999, 1); // Also doesn't panic
The documentation for
ByteOrder::write_int
says:However, passing inputs that fail the first condition doesn't actually cause a panic: