const
-ify some {IndexVec, IndexSlice}
methods
This commit is contained in:
parent
99ebfe2f15
commit
7d23b52376
2 changed files with 11 additions and 11 deletions
|
@ -26,12 +26,12 @@ pub struct IndexVec<I: Idx, T> {
|
|||
|
||||
impl<I: Idx, T> IndexVec<I, T> {
|
||||
#[inline]
|
||||
pub fn new() -> Self {
|
||||
pub const fn new() -> Self {
|
||||
IndexVec { raw: Vec::new(), _marker: PhantomData }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn from_raw(raw: Vec<T>) -> Self {
|
||||
pub const fn from_raw(raw: Vec<T>) -> Self {
|
||||
IndexVec { raw, _marker: PhantomData }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue