The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Append One Vec To Another Vec In Rust

TODO: Pull subtitle into page object
Code
let mut vec = vec![1, 2, 3];
let mut vec2 = vec![4, 5, 6];
vec.append(&mut vec2);
assert_eq!(vec, [1, 2, 3, 4, 5, 6]);
assert_eq!(vec2, []);


Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Append One Vec To Another Vec In Rust

From the docs


-- code
-- rust

let mut vec = vec![1, 2, 3];
let mut vec2 = vec![4, 5, 6];
vec.append(&mut vec2);
assert_eq!(vec, [1, 2, 3, 4, 5, 6]);
assert_eq!(vec2, []);




-- ref
-- url: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.append

-- categories
-- Miscellaneous

-- metadata
-- date: 2023-07-09 17:43:05
-- id: 2slw5sd8
-- site: aws
-- type: post
-- status: draft