Unable to print the absolute value for i64 type without using the variable in Rust

前端 未结 0 1891
离开以前
离开以前 2021-02-07 09:47

I want to implement the method named abs(). When I use a variable leveraging let, everything works fine:

fn main() {
    let x = -5i64;
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题