Created
December 27, 2018 17:02
-
-
Save randomPoison/8804b8d778579019849bcf23bd0417ea to your computer and use it in GitHub Desktop.
Tapping is a good Rust pattern and you should use it everywhere!
This file contains 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 app_root = application_root_dir().unwrap(); | |
// TIRED | |
let mut path = app_root.clone(); | |
path.push("examples/pong/resources/display.ron"); | |
// WIRED | |
let path = app_root | |
.clone() | |
.tap(|path| path.push("examples/pong/resources/display.ron")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment