3 ms·
What's the rust name/syntax for non-nil vars?
by beagle3 12y ago
What's the rust name/syntax for non-nil vars?
- steveklabnik 12y agolet 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>`.