You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While implementing unescaping for systemd-escape strings, I figured out that
both the escaping and unescaping should take OsStr, not str, since those
strings are not necessarily UTF-8. Do you thing that is doable? Also, the functions
for escaping/unescaping paths should probably take &Path, but OsStr should
be OK too.
Also, if I submit my unescaping function as a pull request, would you consider
merging it?
Thanks,
André Kugland
The text was updated successfully, but these errors were encountered:
Hi and welcome, thanks for having a look at unescaping!
While you are technically right that inputs could be in non-UTF8 encodings, unless you have a very real and compelling usecase involving such inputs, it's reasonable to use str/String here. In the context of Rust and systemd in 2021, it is fair to make such assumptions about non-legacy environments.
Same goes for Path: as we can assume the target environment is a modern Linux, there is little to no interest for non-UNIX separators and weird encodings.
While implementing unescaping for systemd-escape strings, I figured out that
both the escaping and unescaping should take OsStr, not str, since those
strings are not necessarily UTF-8. Do you thing that is doable? Also, the functions
for escaping/unescaping paths should probably take &Path, but OsStr should
be OK too.
Also, if I submit my unescaping function as a pull request, would you consider
merging it?
Thanks,
André Kugland
The text was updated successfully, but these errors were encountered: