Created
April 1, 2022 02:18
-
-
Save jcar787/dbb06d53ec61ea4f29ef4c598c8a29ae to your computer and use it in GitHub Desktop.
vec! macro example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let mut another_vec =!vec[5, 1,] ; // another_vec = [5, 1] | |
another_vec.push(2); // another_vec = [5, 1, 2] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment