mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 23:11:14 -03:00
wchar_ffi.rs: implement from_ffi() for more FFI strings
This commit is contained in:
@@ -127,8 +127,20 @@ pub trait WCharFromFFI<Target> {
|
||||
fn from_ffi(&self) -> Target;
|
||||
}
|
||||
|
||||
impl WCharFromFFI<WString> for cxx::CxxWString {
|
||||
fn from_ffi(&self) -> WString {
|
||||
WString::from_chars(self.as_chars())
|
||||
}
|
||||
}
|
||||
|
||||
impl WCharFromFFI<WString> for cxx::UniquePtr<cxx::CxxWString> {
|
||||
fn from_ffi(&self) -> WString {
|
||||
WString::from_chars(self.as_chars())
|
||||
}
|
||||
}
|
||||
|
||||
impl WCharFromFFI<WString> for cxx::SharedPtr<cxx::CxxWString> {
|
||||
fn from_ffi(&self) -> WString {
|
||||
WString::from_chars(self.as_chars())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user