Use `as_slice()` instead of a temporary to get &[T] instead of &[T, ..0]
Fix tests to build with current rust