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
{{ message }}
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
There are several functions that take Strings as arguments and then use them as file paths. The container_api::Configuration has several examples of this. Let's clean up some of these in one big PR.
The text was updated successfully, but these errors were encountered:
Resolves#660
This change is valuable because you may obtain a path that
contains non-utf8 data and try to use it with these APIs,
but if these APIs take Strings, you have to lossily convert it
and you can't operate on those files.
The main non-obvious change as a result of this effort are changes like:
```
format!("using path: \'{}\'", some_string_path)
```
to
```
format!("using path: {:?}", some_pathbuf)
```
these result in a change from single quotes to double quotes.
The alternative substition is
```
format!("using path: \'{}\'", some_pathbuf.to_string_lossy())
```
this has the advantage of preserving single-quotes, but has the
disadvantage of requiring an extra allocation over the more
efficient Debug-impl of PathBuf.
There are existing instances in the code where the later approach is
used, it may be worth changing all instances to use the same choice.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
There are several functions that take Strings as arguments and then use them as file paths. The container_api::Configuration has several examples of this. Let's clean up some of these in one big PR.
The text was updated successfully, but these errors were encountered: