This commit is contained in:
JT
2021-09-04 19:59:38 +12:00
parent 198a36b744
commit d9cff4238d
8 changed files with 31 additions and 40 deletions

View File

@ -119,6 +119,7 @@ impl EngineState {
.expect("internal error: missing variable")
}
#[allow(clippy::borrowed_box)]
pub fn get_decl(&self, decl_id: DeclId) -> &Box<dyn Command> {
self.decls
.get(decl_id)
@ -460,6 +461,7 @@ impl<'a> StateWorkingSet<'a> {
}
}
#[allow(clippy::borrowed_box)]
pub fn get_decl(&self, decl_id: DeclId) -> &Box<dyn Command> {
let num_permanent_decls = self.permanent_state.num_decls();
if decl_id < num_permanent_decls {