Fix test_path_like_objects#4773
Conversation
6d9b839 to
63dbdca
Compare
| pub fn as_str(&self) -> &str { | ||
| match self { | ||
| FsPath::Bytes(b) => std::str::from_utf8(b).unwrap(), | ||
| FsPath::Str(s) => s.as_str(), | ||
| } | ||
| } |
There was a problem hiding this comment.
Since FsPath is intended to obtain OsString in Rust side, I am opposed to add as_str like this signature here.
My suggestion is adding
fn to_os_string(&self) -> std::os::OsStringand use it from fn compile.
Not this case, but even if we need to implement as_str(), it will look like:
pub fn as_str(&self) -> Result<&str, Utf8Error>|
Oh, |
|
@ilp-sys Hi, is this accidently closed? could you open it again? |
|
I must have done something wrong with the git cli, reopened it . |
|
I found refactoring FsPath is more complex issue than it looks like. Let me look in more for a few more days. |
|
@ilp-sys #4782 is finally done! Could you please rebase this patch? I think removing the last commit will make the other 2 commits be rebase without conflict. And not that much changes will be needed. |
17ea73a to
37b7f01
Compare
|
|
37b7f01 to
7262616
Compare
add support for FsPath