Skip to content

Instantly share code, notes, and snippets.

@jcar787
Created April 1, 2022 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcar787/dbb06d53ec61ea4f29ef4c598c8a29ae to your computer and use it in GitHub Desktop.
Save jcar787/dbb06d53ec61ea4f29ef4c598c8a29ae to your computer and use it in GitHub Desktop.
vec! macro example
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