Created
January 11, 2017 05:49
-
-
Save mysteriouspants/67b497be7b13b5fe67f01ddf66bab7d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error: borrowed value does not live long enough | |
--> src\main.rs:80:29 | |
| | |
80 | current_dir().unwrap().as_path() | |
| ^^^^^^^^^^^^^^^^^^^^^^ temporary value created here | |
81 | }; | |
| - temporary value only lives until here | |
... | |
92 | } | |
| - temporary value needs to live until here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let working_directory = if matches.is_present("root") { | |
Path::new(matches.value_of("root").unwrap()) | |
} else { | |
current_dir().unwrap().as_path() | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment