Feat: abstraction lifetimes work out nicely
This commit is contained in:
1 parent
a99147c85b
commit
2284b35782
2 files changed
+46
-42
No files matched your search
@@ -22,11 +22,11 @@ impl ScopeArena {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get(&self, idx: ScopeIdx) -> Result<&Scope> {
|
||||
pub fn try_get(&self, idx: ScopeIdx) -> Result<&Scope> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn get_mut(&self, idx: ScopeIdx) -> Result<&Scope> {
|
||||
pub fn try_get_mut(&self, idx: ScopeIdx) -> Result<&mut Scope> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ impl ScopeArena {
|
||||
todo!()
|
||||
}
|
||||
|
||||
pub fn with<T>(&mut self, f: impl FnOnce(&mut Arena<Scope>) -> T) -> T {
|
||||
pub fn with<T>(&self, f: impl FnOnce(&mut Arena<Scope>) -> T) -> Result<T> {
|
||||
todo!()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user