If you have a reference to some data and you want to pass it to a function that takes a slice, you can use std::array::from_ref to cheaply create a slice without copying.
Docs: https://doc.rust-lang.org/std/array/f...
http://geeklaunch.io/
Follow GeekLaunch on Twitter: / geek_launch
Not a geek? Start today!