diff --git a/fish-rust/src/wchar_ffi.rs b/fish-rust/src/wchar_ffi.rs index 4ec7582cc..32b75df67 100644 --- a/fish-rust/src/wchar_ffi.rs +++ b/fish-rust/src/wchar_ffi.rs @@ -127,8 +127,20 @@ pub trait WCharFromFFI { fn from_ffi(&self) -> Target; } +impl WCharFromFFI for cxx::CxxWString { + fn from_ffi(&self) -> WString { + WString::from_chars(self.as_chars()) + } +} + impl WCharFromFFI for cxx::UniquePtr { fn from_ffi(&self) -> WString { WString::from_chars(self.as_chars()) } } + +impl WCharFromFFI for cxx::SharedPtr { + fn from_ffi(&self) -> WString { + WString::from_chars(self.as_chars()) + } +}