Move function calling to separate source file.

This commit is contained in:
Stephen Chung
2020-07-23 18:40:42 +08:00
parent 1a48a2d8ba
commit bff266d4e1
13 changed files with 1203 additions and 1124 deletions

View File

@@ -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;