papyrus
papyrus copied to clipboard
Coerced app_data can hard crash
Take example below. Crashes, but using &String
instead of &str
works. Maybe something to do with coercion, and might be a little tricky solve =/.
let v = String::from("Hello, world!");
let mut data = repl_data!(&str);
let mut repl = papyrus::Repl::default_terminal(&mut data);
for ch in "app_data\n".chars() {
repl = match repl.push_input(ch) {
papyrus::repl::PushResult::Read(r) => r,
papyrus::repl::PushResult::Eval(r) => r.eval(&v).unwrap().print(),
}
}