Created
May 24, 2017 04:38
-
-
Save saethlin/103dad47b8260572bc99c4f5cbc11646 to your computer and use it in GitHub Desktop.
Clippy? Are you okay?
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
warning: use of `unwrap_or` followed by a function call | |
--> src/commands/ls.rs:30:33 | |
| | |
30 | let dir = Path::new(options.value_of_os("directory").unwrap_or(state.directory.as_os_str())); | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this `options.value_of_os("directory").unwrap_or_else(|| state.directory.as_os_str())` | |
| | |
= note: #[warn(or_fun_call)] on by default | |
= help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#or_fun_call |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment