[][src]Function sdset::set::vec_slices_into_sets_unchecked

pub fn vec_slices_into_sets_unchecked<T>(vec: Vec<&[T]>) -> Vec<&Set<T>>

Transmutes slices without checking them.

This is useful when you don't want to introduce another allocation to your program and you are sure all these slices are valid Sets.

Examples

use sdset::set::vec_slices_into_sets_unchecked;

// these slices are not sorted!
let a = &[1, 6, 4][..];
let b = &[1, 6, 1];
let slices = vec![a, b];

// but we can still create a Vec of Sets, so be careful!
let sets = vec_slices_into_sets_unchecked(slices);