Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

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

@mibes

Description

@mibes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions