Skip to content

Commit 32ad734

Browse files
rben01sharkdp
authored andcommitted
Removed needless Result from BytecodeInterpreter::compile_define_variable
1 parent c370774 commit 32ad734

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

numbat/src/bytecode_interpreter.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ impl BytecodeInterpreter {
274274
};
275275
}
276276

277-
fn compile_define_variable(&mut self, define_variable: &DefineVariable) -> Result<()> {
277+
fn compile_define_variable(&mut self, define_variable: &DefineVariable) {
278278
let DefineVariable(identifier, decorators, expr, _annotation, _type, _readable_type) =
279279
define_variable;
280280
let current_depth = self.current_depth();
@@ -295,7 +295,6 @@ impl BytecodeInterpreter {
295295
identifiers,
296296
metadata,
297297
});
298-
Ok(())
299298
}
300299

301300
fn compile_statement(
@@ -309,7 +308,7 @@ impl BytecodeInterpreter {
309308
self.vm.add_op(Op::Return);
310309
}
311310
Statement::DefineVariable(define_variable) => {
312-
self.compile_define_variable(define_variable)?
311+
self.compile_define_variable(define_variable);
313312
}
314313
Statement::DefineFunction(
315314
name,
@@ -334,7 +333,7 @@ impl BytecodeInterpreter {
334333
});
335334
}
336335
for local_variables in local_variables {
337-
self.compile_define_variable(local_variables)?;
336+
self.compile_define_variable(local_variables);
338337
}
339338

340339
self.compile_expression(expr);

0 commit comments

Comments
 (0)