Move function calling to separate source file.
This commit is contained in:
15
src/utils.rs
15
src/utils.rs
@@ -15,7 +15,7 @@ use crate::stdlib::{
|
||||
iter::FromIterator,
|
||||
mem,
|
||||
mem::MaybeUninit,
|
||||
ops::{Add, AddAssign, Deref, Drop, Index, IndexMut},
|
||||
ops::{Add, AddAssign, Deref, DerefMut, Drop, Index, IndexMut},
|
||||
str::FromStr,
|
||||
string::{String, ToString},
|
||||
vec::Vec,
|
||||
@@ -572,6 +572,19 @@ impl<T> AsMut<[T]> for StaticVec<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Deref for StaticVec<T> {
|
||||
type Target = [T];
|
||||
fn deref(&self) -> &Self::Target {
|
||||
self.as_ref()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> DerefMut for StaticVec<T> {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
self.as_mut()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Index<usize> for StaticVec<T> {
|
||||
type Output = T;
|
||||
|
||||
|
Reference in New Issue
Block a user