Closed
Description
It is possible to create an empty PathBuf
:
let p = PathBuf::new();
— yet PathBuf
has no is_empty()
function (nor, apparently, do Path
or OsStr
or OsString
).
This seems inconsistent.
Of course, there are several ways around this (p == PathBuf::new()
, p.to_str().map_or(true, |s| s.is_empty())
, wrapping with Option
), but having a simple way to check this would be nice.