robin_merge

Crates.iorobin_merge
lib.rsrobin_merge
version0.1.1
sourcesrc
created_at2022-12-07 17:41:43.067413
updated_at2022-12-07 18:10:53.93323
descriptionA Rust crate for merging vectors round-robin style.
homepage
repositoryhttps://codeberg.org/imbev/robin_merge
max_upload_size
id732007
size4,397
(imbev)

documentation

https://docs.rs/robin_merge/

README

robin_merge

Crates.io Docs

robin_merge is a Rust crate for merging vectors round-robin style.

Example

robin_merge::merge_vectors merges a vector of vectors of values into a single vector of values round-robin style. The type of the values in the vectors must implement Copy.

let vec_1 = vec![1,2];
let vec_2 = vec![3,4];
let merged = robin_merge::merge_vectors(&vec![vec_1, vec_2]);
assert_eq!(merged, vec![1,3,2,4])
Commit count: 0

cargo fmt