[improvement] running rustls-server from workspace panics
opened this issue · comments
Deleted user commented
As a cargo user, I expect to be able to run packages from a cargo workspace.
- I ran:
cargo run --bin rustls-server
It errored with:
Running `target/debug/rustls-server`
Started http server: 127.0.0.1:8443
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', security/rustls/src/main.rs:28:64
improvement guide
The following lines load the key pair:
examples/security/rustls/src/main.rs
Lines 28 to 29 in d3543e5
They expect the key files to be in the current directory but they are not.
An improvement would be to resolve those files dynamically.
Consider updating those lines to avoid using
unwrap
too.