3 ms·
> There is also PathBuf, which would use a string in most languages. I feel bad for them. I wanted to fix something in NeoVim's built-in lsp recently and lost
by 0x457 4y ago
> There is also PathBuf, which would use a string in most languages.
I feel bad for them. I wanted to fix something in NeoVim's built-in lsp recently and lost all interest because of all the things you have to do to:
- Get parent directory for a path
- Create that directory if it exists
Why was I annoyed by that? Well, different OSs use different path separators, in rust this is trivial because `Path` and `PathBuf` are target-specific.
That's not a type of string though, it's a path, the fact that it uses `OsString` underneath is irrelevant.
> Vec<u8> or Vec<Char>
There isn't really anything special to learn about it them, though? I doubt newbie encounter this while learning. Slices are the same thing, you just can't extend it, what is there to learn?