renamed vec::from_slice to vec::to_owned
renamed str::from_slice to str::to_owned
auto merge of #6389 : sonwow/rust/issue-3356, r=bstrie

Fix for #3356