Use env::var_os instead of env::var

For the unliekly case in which the git repository is checked out in a directory
that cannot be represented with unicode
This commit is contained in:
Olivier Goffart 2020-06-05 11:30:38 +02:00
parent 31da762245
commit 0553ab8b1a
4 changed files with 12 additions and 12 deletions

View file

@ -131,7 +131,7 @@ pub fn sixtyfps(stream: TokenStream) -> TokenStream {
let (syntax_node, mut diag) = parser::parse_tokens(tokens.clone());
if let Ok(cargo_manifest) = std::env::var("CARGO_MANIFEST_DIR") {
if let Some(cargo_manifest) = std::env::var_os("CARGO_MANIFEST_DIR") {
diag.current_path = cargo_manifest.into();
diag.current_path.push("Cargo.toml");
}