This commit is contained in:
Nathan Sobo
2021-07-23 12:25:09 -06:00
parent 11285f3762
commit f81f043058
8 changed files with 513 additions and 568 deletions
+7 -1
View File
@@ -23,7 +23,7 @@ use std::{
fmt::{self, Debug},
hash::{Hash, Hasher},
marker::PhantomData,
ops::Deref,
ops::{Deref, DerefMut},
path::{Path, PathBuf},
rc::{self, Rc},
sync::{Arc, Weak},
@@ -2110,6 +2110,12 @@ impl<M> Deref for ViewContext<'_, M> {
}
}
impl<M> DerefMut for ViewContext<'_, M> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.app
}
}
impl<M> AsMut<MutableAppContext> for ViewContext<'_, M> {
fn as_mut(&mut self) -> &mut MutableAppContext {
self.app