-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
globset: Support paths already present as [u8] (e.g. typed_path::Path) #2954
Comments
However... it looks like I might revisit this in a |
Thanks @BurntSushi for your fast response! I must say that I am not very satisfied with your proposal :-/ The idea of using About API: A I however respect if you don't want to change your API. In that case I'd actually prefer to maintain a fork which provides that functionality (which seems to be the lesser evil to me compared to the conversion hassle when coding platform-agnostic) Merry Christmas! |
I think I'd be open to a Note that the encoding of the bytes still has to be conventionally UTF-8, even if it isn't fully valid. So, e.g., WTF-8 would be okay. But you'll get nonsense if you pass a |
Hi!
I'd like to use
globset
to match paths - but I like to usetyped_path::Path
for them. This means they are already represented as[u8]
on windows and unix platforms. Unfortunately, matching is currently only supported forAsRef<Path>
andCandidate
which can itself only be created fromAsRef<Path>
.I could convert
typed_path::Path
into astd::pathPath
/std::path::PathBuf
but this is ugly because it will internally convert back and forth and (more annoying) the conversation may fail (e.g. non-UTF parts on windows).Is it possible to add support for
AsRef<[u8]>
or something similar?Thanks in advance!
The text was updated successfully, but these errors were encountered: