3 ms·
let foo = 5; // cannot be null let bar = Some(5); // technically also can't be null, but could be None // instead of Some(val) `foo`
by steveklabnik 12y ago
let foo = 5; // cannot be null
let bar = Some(5); // technically also can't be null, but could be None
// instead of Some(val)
`foo` has the type `i32` here, and `bar` has the type `Option<i32>`.