🚨 clippy pass

main
_ 2023-09-24 17:42:56 -05:00
parent 89c3b6e0ca
commit a2c91757cf
2 changed files with 4 additions and 3 deletions

View File

@ -120,14 +120,14 @@ impl State {
let env = BTreeMap::from_iter ([
("arg", Value::BogusArg (arg)),
("print", Value::BogusPrint),
].map (|(k, v)| (k.to_string (), v)).into_iter ());
].map (|(k, v)| (k.to_string (), v)));
vec! [
Value::BogusEnv (env),
]
}
pub fn execute_chunk (&mut self, chunk: &Chunk, upvalues: &Vec <Value>)
pub fn execute_chunk (&mut self, chunk: &Chunk, upvalues: &[Value])
-> Vec <Value> {
let max_iters = 2000;

View File

@ -38,6 +38,7 @@ fn floats () {
for (arg, expected) in [
(vec! ["_exe_name"], vec! [3.5.into ()]),
(vec! ["_exe_name", " "], vec! [3.5.into ()]),
] {
let mut vm = State::default ();
let upvalues = State::upvalues_from_args (arg.into_iter ().map (|s| s.to_string ()));
@ -85,7 +86,7 @@ fn is_93 () {
"print",
"it's 93",
"it's not 93",
].into_iter ().map (|s| Value::from (s)).collect (),
].into_iter ().map (Value::from).collect (),
};
for (arg, expected) in [