Resolve all clippy lints
This commit is contained in:
parent
8940f37654
commit
728eb071e8
@ -4,23 +4,13 @@ use crate::FunctionType;
|
||||
|
||||
use super::DustString;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, PartialOrd)]
|
||||
#[derive(Clone, Debug, Default, PartialEq, PartialOrd)]
|
||||
pub struct Function {
|
||||
pub name: Option<DustString>,
|
||||
pub r#type: FunctionType,
|
||||
pub prototype_index: u16,
|
||||
}
|
||||
|
||||
impl Default for Function {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
name: None,
|
||||
r#type: FunctionType::default(),
|
||||
prototype_index: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for Function {
|
||||
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
|
||||
let mut type_string = self.r#type.to_string();
|
||||
|
@ -213,11 +213,15 @@ impl Action {
|
||||
Operation::MULTIPLY => multiply,
|
||||
Operation::DIVIDE => divide,
|
||||
Operation::MODULO => modulo,
|
||||
Operation::NEGATE => negate,
|
||||
Operation::NOT => not,
|
||||
Operation::EQUAL => equal,
|
||||
Operation::LESS => less,
|
||||
Operation::LESS_EQUAL => less_equal,
|
||||
Operation::TEST => test,
|
||||
Operation::TEST_SET => test_set,
|
||||
Operation::CALL => call,
|
||||
Operation::CALL_NATIVE => call_native,
|
||||
Operation::JUMP => jump,
|
||||
Operation::RETURN => r#return,
|
||||
_ => todo!(),
|
||||
@ -1320,19 +1324,19 @@ fn less_equal(
|
||||
}
|
||||
}
|
||||
|
||||
fn negate(_: InstructionFields, _: &mut Thread, _: &mut PointerCache) {
|
||||
fn negate(_: &mut usize, _: InstructionFields, _: &mut Thread, _: &mut PointerCache) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn not(_: InstructionFields, _: &mut Thread, _: &mut PointerCache) {
|
||||
fn not(_: &mut usize, _: InstructionFields, _: &mut Thread, _: &mut PointerCache) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn call(_: InstructionFields, _: &mut Thread, _: &mut PointerCache) {
|
||||
fn call(_: &mut usize, _: InstructionFields, _: &mut Thread, _: &mut PointerCache) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn call_native(_: InstructionFields, _: &mut Thread, _: &mut PointerCache) {
|
||||
fn call_native(_: &mut usize, _: InstructionFields, _: &mut Thread, _: &mut PointerCache) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user