Clean up warnings
This commit is contained in:
parent
ed05a981e7
commit
71da39f8b5
@ -86,10 +86,6 @@ struct Cli {
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[clap(
|
||||
styles = STYLES,
|
||||
)]
|
||||
#[group()]
|
||||
struct Input {
|
||||
/// Source code to run instead of a file
|
||||
#[arg(short, long, value_hint = ValueHint::Other, value_name = "INPUT")]
|
||||
@ -234,7 +230,7 @@ fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
let chunk = compiler.finish(file_name);
|
||||
let chunk = compiler.finish(name.or(file_name));
|
||||
let mut stdout = stdout().lock();
|
||||
|
||||
chunk
|
||||
|
@ -49,6 +49,7 @@ pub struct Chunk {
|
||||
}
|
||||
|
||||
impl Chunk {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(crate) fn new(
|
||||
name: Option<DustString>,
|
||||
r#type: FunctionType,
|
||||
|
@ -20,11 +20,11 @@ pub struct Record {
|
||||
constants: SmallVec<[Value; 16]>,
|
||||
locals: SmallVec<[Local; 8]>,
|
||||
|
||||
stack_size: usize,
|
||||
index: u8,
|
||||
}
|
||||
|
||||
impl Record {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn new(
|
||||
actions: SmallVec<[RunAction; 32]>,
|
||||
last_assigned_register: Option<u8>,
|
||||
@ -46,7 +46,6 @@ impl Record {
|
||||
positions,
|
||||
constants,
|
||||
locals,
|
||||
stack_size,
|
||||
index,
|
||||
}
|
||||
}
|
||||
@ -88,19 +87,6 @@ impl Record {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn follow_pointer_allow_empty(&self, pointer: Pointer) -> Option<&Value> {
|
||||
log::trace!("Follow pointer {pointer}");
|
||||
|
||||
match pointer {
|
||||
Pointer::Stack(register_index) => self.open_register_allow_empty(register_index),
|
||||
Pointer::Constant(constant_index) => {
|
||||
let constant = self.get_constant(constant_index);
|
||||
|
||||
Some(constant)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_register(&self, register_index: u8) -> &Register {
|
||||
log::trace!("Get register R{register_index}");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user