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
I found myself needing to convert between Cow<'a, str> and Cow<'a, Utf8Path>. This is a bit awkward with the current crate APIs because you need to explicitly construct a Cow or Utf8Path/Utf8PathBuf at the call site. I'd prefer to e.g. just .into() on a Cow<'a, str> to get a Cow<'a, Utf8Path>.
What do you think about adding explicit Cow<'a, str> type conversions to Utf8Path and Utf8PathBuf?
The text was updated successfully, but these errors were encountered:
error[E0117]: only traits defined in the current crate can be implemented for types defined outside of the crate
--> src/lib.rs:2253:1
|
2253 | impl<'a> From<Cow<'a, str>> for Cow<'a, Utf8Path> {
| ^^^^^^^^^------------------^^^^^-----------------
| | | |
| | | `Cow` is not defined in the current crate
| | `Cow` is not defined in the current crate
| impl doesn't use only types from inside the current crate
|
= note: define and implement a trait or new type instead
For more information about this error, try `rustc --explain E0117`.
error: could not compile `camino` due to previous error
I guess we could add explicit methods to do this. Not sure what to call them.
Thanks for this terrific crate!
I found myself needing to convert between
Cow<'a, str>
andCow<'a, Utf8Path>
. This is a bit awkward with the current crate APIs because you need to explicitly construct aCow
orUtf8Path
/Utf8PathBuf
at the call site. I'd prefer to e.g. just.into()
on aCow<'a, str>
to get aCow<'a, Utf8Path>
.What do you think about adding explicit
Cow<'a, str>
type conversions toUtf8Path
andUtf8PathBuf
?The text was updated successfully, but these errors were encountered: