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

Unwrap of a None value when config is not set #13

Open
mibes opened this issue Nov 5, 2022 · 1 comment · May be fixed by #14
Open

Unwrap of a None value when config is not set #13

mibes opened this issue Nov 5, 2022 · 1 comment · May be fixed by #14

Comments

@mibes
Copy link

mibes commented Nov 5, 2022

In version 0.4.0 there is a panic when call is called when an unset config:

tokio-runtime-worker' panicked at 'called `Option::unwrap()` on a `None` value', /Users/mibes/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-alpn-0.4.0/src/lib.rs:263:22
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

This is due to the wrong config-clone that is used after self.build_config(). I suppose it should have gotten the config from self:

let config = self.config.clone();
if config.is_none() {
    self.build_config()
}
let config = config.unwrap();

I'll do a pull request to address this.

@mibes mibes linked a pull request Nov 5, 2022 that will close this issue
3 tasks
@vhawley
Copy link

vhawley commented Jan 5, 2023

I am experiencing this issue too.

The fix in the linked pull request looks and behaves as expected.

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.

2 participants