From 270638e816012fe05d0a22f10f7028ad9b9967a3 Mon Sep 17 00:00:00 2001
From: y21 <30553356+y21@users.noreply.github.com>
Date: Thu, 12 Sep 2024 17:31:27 +0200
Subject: [PATCH] re-enable and fix `clippy::needless_lifetimes`
---
crates/dash_vm/src/dispatch.rs | 170 ++++++++++++++++-----------------
1 file changed, 85 insertions(+), 85 deletions(-)
diff --git a/crates/dash_vm/src/dispatch.rs b/crates/dash_vm/src/dispatch.rs
index 1bc8f47a..492ef727 100755
--- a/crates/dash_vm/src/dispatch.rs
+++ b/crates/dash_vm/src/dispatch.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::needless_lifetimes)] // for now
-
use dash_log::warn;
use std::ops::{Deref, DerefMut};
use std::vec::Drain;
@@ -14,6 +12,7 @@ use super::Vm;
use dash_middle::compiler::constant::Constant;
use dash_middle::compiler::instruction::Instruction;
+#[derive(Debug)]
pub enum HandleResult {
Return(Unrooted),
Yield(Unrooted),
@@ -568,7 +567,7 @@ mod handlers {
use super::*;
- fn constant_instruction<'vm>(mut cx: DispatchContext<'vm>, idx: usize) -> Result<(), Value> {
+ fn constant_instruction(mut cx: DispatchContext<'_>, idx: usize) -> Result<(), Value> {
let constant = cx.constant(idx);
let value = Value::from_constant(constant.clone(), &mut cx);
@@ -576,74 +575,74 @@ mod handlers {
Ok(())
}
- pub fn constant<'vm>(mut cx: DispatchContext<'vm>) -> Result