News for hackers. Stuff that matters.
Re:Rust for JavaScript Developers – Functions and Control Flow by nyanpasu64 on Monday July 06, 2020 @02:53PM (#23751366)
This behaves differently for negative incomes, which are not prohibited by the i32 argument passed in (u32 cannot take on negative values).
Re:Rust for JavaScript Developers – Functions and Control Flow by delta1 on Tuesday July 07, 2020 @04:09AM (#23756827)
Yeah I was just literally translating the previous code as an example, I didn't get the business rules specification

¯\_(ツ)_/¯

Re:Rust for JavaScript Developers – Functions and Control Flow by eximius on Monday July 06, 2020 @08:28PM (#23754351)
Ranges support negatives, so thats nice. Though i32::MIN..=9 is at least slightly odd.