Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coerced app_data can hard crash #20

Open
kurtlawrence opened this issue Mar 18, 2019 · 0 comments
Open

Coerced app_data can hard crash #20

kurtlawrence opened this issue Mar 18, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@kurtlawrence
Copy link
Owner

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(),
	}
}
@kurtlawrence kurtlawrence added the bug Something isn't working label Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant