[Rust] Constants

Constants variable always need to be annotated:

const NUMBER: i32 = 3;
fn main() {
    println!("Number {}", NUMBER);
}

 

posted @ 2024-02-23 15:02  Zhentiw  阅读(2)  评论(0编辑  收藏  举报