syntax: Don't use unstable fn to convert single element to a slice
This commit is contained in:
parent
e3dd68d0a4
commit
bc6d990adb
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue