Avoid unnecessary closure in a map call

This commit is contained in:
Honza Pokorny 2017-01-07 08:43:34 -04:00
parent e98e6bdf64
commit a01ef5568f
1 changed files with 1 additions and 1 deletions

View File

@ -885,7 +885,7 @@ impl Config {
pub fn shell(&self) -> Option<&Path> {
self.shell
.as_ref()
.map(|p| p.as_path())
.map(PathBuf::as_path)
}
fn load_from<P: Into<PathBuf>>(path: P) -> Result<Config> {