syntax: Don't use unstable fn to convert single element to a slice
This commit is contained in:
parent
e3dd68d0a4
commit
bc6d990adb
@ -64,7 +64,10 @@ impl<T> SmallVector<T> {
|
||||
let result: &[T] = &[];
|
||||
result
|
||||
}
|
||||
One(ref v) => slice::ref_slice(v),
|
||||
One(ref v) => {
|
||||
// FIXME: Could be replaced with `slice::ref_slice(v)` when it is stable.
|
||||
unsafe { slice::from_raw_parts(v, 1) }
|
||||
}
|
||||
Many(ref vs) => vs
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user