Skip to content

Coerced app_data can hard crash #20

@kurtlawrence

Description

@kurtlawrence

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(),
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions