Use b-string instead of array of b-chars

This commit is contained in:
Alex Bethel 2021-12-08 14:39:04 -07:00
parent 20c6b4c7cf
commit 3cdca1666a

View file

@ -208,7 +208,7 @@ impl Value {
Value::Str(s) => Functio::Eval(s), Value::Str(s) => Functio::Eval(s),
Value::Int(i) => Functio::BfFunctio { Value::Int(i) => Functio::BfFunctio {
instructions: { instructions: {
let instruction_mappings = [b'[', b']', b'+', b'-', b',', b'.', b'<', b'>']; let instruction_mappings = b"[]+-,.<>";
std::iter::successors(Some(i as usize), |i| { std::iter::successors(Some(i as usize), |i| {
Some(i / instruction_mappings.len()) Some(i / instruction_mappings.len())
}) })