Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn abs(t: &i32) -> i32 {
- if t.is_negative() { -*t } else { *t }
- }
- fn main() {
- println!("{}", abs(&i32::min_value()))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement