Closed Sean1708 closed 8 years ago
Currently this is done like so
header_path.file_stem().map(|p| p.to_str().unwrap_or("default")).unwrap_or("default"),
because both .file_stem() and .to_str() return Option. Is there a cleaner way to do this? Should we die if we can't get the .file_stem() (because it might suggest problems down the road)?
.file_stem()
.to_str()
Option
How about display?
Currently this is done like so
because both
.file_stem()
and.to_str()
returnOption
. Is there a cleaner way to do this? Should we die if we can't get the.file_stem()
(because it might suggest problems down the road)?