File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ pthread-3ds = { workspace = true }
2424libc = { workspace = true , default-features = true }
2525bitflags = " 2.6.0"
2626macaddr = " 1.0.1"
27- widestring = " 1.1.0"
2827
2928[build-dependencies ]
3029toml = " 0.9.4"
Original file line number Diff line number Diff line change @@ -772,13 +772,13 @@ impl SoftwareKeyboard {
772772
773773 if swkbd. text_length > 0 {
774774 let text16 = unsafe {
775- widestring :: Utf16Str :: from_slice_unchecked ( std:: slice:: from_raw_parts (
775+ std:: slice:: from_raw_parts (
776776 swkbd_shared_mem_ptr. add ( swkbd. text_offset as _ ) . cast ( ) ,
777777 swkbd. text_length as _ ,
778- ) )
778+ )
779779 } ;
780780
781- * output = text16. to_string ( ) ;
781+ * output = String :: from_utf16 ( text16) . unwrap ( ) ;
782782 }
783783
784784 if swkbd. save_state_flags & ( 1 << 0 ) != 0 {
@@ -825,13 +825,13 @@ impl SoftwareKeyboard {
825825 let data = unsafe { & * user. cast :: < MessageCallbackData > ( ) } ;
826826
827827 let text16 = unsafe {
828- widestring :: Utf16Str :: from_slice_unchecked ( std:: slice:: from_raw_parts (
828+ std:: slice:: from_raw_parts (
829829 data. swkbd_shared_mem_ptr . add ( swkbd. text_offset as _ ) . cast ( ) ,
830830 swkbd. text_length as _ ,
831- ) )
831+ )
832832 } ;
833833
834- let text8 = text16. to_string ( ) ;
834+ let text8 = String :: from_utf16 ( text16) . unwrap ( ) ;
835835
836836 let result = unsafe { & mut * * data. filter_callback } ( & text8) ;
837837
You can’t perform that action at this time.
0 commit comments