mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 22:03:12 +00:00
998cb7f1cd
wcs2string converts a wide string to a narrow one. The result is null-terminated and may also contain interior null-characters. std::string allows this. Rust's null-terminated string, CString, does not like interior null-characters. This means we will need to use Vec<u8> or OsString for the places where we use interior null-characters. On the other hand, we want to use CString for places that require a null-terminator, because other Rust types don't guarantee the null-terminator. Turns out there is basically no overlap between the two use cases, so make it two functions. Their equivalents in Rust will have the same name, so we'll only need to adjust the type when porting. |
||
---|---|---|
.. | ||
src | ||
widestring-suffix | ||
build.rs | ||
Cargo.lock | ||
Cargo.toml |