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

Harsh::decode panics when given input with invalid alphabet #12

Closed
roosmaa opened this issue Jul 1, 2018 · 0 comments · Fixed by #13
Closed

Harsh::decode panics when given input with invalid alphabet #12

roosmaa opened this issue Jul 1, 2018 · 0 comments · Fixed by #13

Comments

@roosmaa
Copy link

roosmaa commented Jul 1, 2018

Here's the test case:

extern crate harsh;

fn main() {
    let h = harsh::HarshBuilder::new()
        .init().unwrap();
    h.decode("non-alphabet.characters=will|cause$panic");
    println!("No hello worlds :(");
}

And the output:

$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.00s
     Running `target/debug/harsh-test`
thread 'main' panicked at 'what a world, what a world!', libcore/option.rs:914:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Expected the decode to return Option::None, not panic.

Harsh version 0.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant