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
More robust asset paths in examples #1090
Conversation
@@ -30,8 +37,8 @@ async fn main() { | |||
.init(); | |||
|
|||
let rustls_config = rustls_server_config( | |||
"examples/tls-rustls/self_signed_certs/key.pem", | |||
"examples/tls-rustls/self_signed_certs/cert.pem", | |||
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("self_signed_certs/key.pem"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use platform-native path separators while you're at it?
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("self_signed_certs/key.pem"), | |
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("self_signed_certs").join("key.pem"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't resolved, there's at three more of these /
es in string literals in the PR 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh whoops sorry. I'll fix those!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There we go!
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
#1089 for the other examples that read assets.