Closed maackle closed 1 year ago
(author of camino here, including the Arbitrary
impl for Utf8PathBuf
)
I think a useful impl should have a certain number of components separated by MAIN_SEPARATOR
, and should be able to generate relative and absolute paths with 50-50 probability. (And as a stretch goal it could also generate all of the other prefix components on Windows, UNC paths and such)
https://docs.rs/camino/1.1.6/src/camino/proptest_impls.rs.html#14-42
Sorry for the delay in getting to this -- works been busy this week. I'll try to give this a look tonight.
Awesome @sunshowers, that's the kind of the feedback I was hoping for. "The best way to get something done right is to do it wrong on the internet". :)
A minimal implementation of Arbitrary for PathBuf, per #272