mirror of
https://github.com/aphrody-labs/cef-rs.git
synced 2026-10-13 21:06:46 +00:00
Agent-Logs-Url: https://github.com/tauri-apps/cef-rs/sessions/21a8b51d-e1bb-4408-8bde-43f117f16e02 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wravery <6502881+wravery@users.noreply.github.com>
This commit is contained in:
1 file changed
+1
-3
+1
-3
@@ -504,12 +504,10 @@ impl From<&str> for CefStringUtf16 {
|
||||
impl From<&CefStringUserfreeUtf16> for CefStringUtf16 {
|
||||
fn from(value: &CefStringUserfreeUtf16) -> Self {
|
||||
let value: Option<&_cef_string_utf16_t> = value.into();
|
||||
if value.is_none() {
|
||||
eprintln!("Invalid UTF-16 string");
|
||||
}
|
||||
Self(CefStringData::Clear(value.and_then(|value| unsafe {
|
||||
let mut data = mem::zeroed();
|
||||
if cef_dll_sys::cef_string_utf16_set(value.str_, value.length, &mut data, 1) == 0 {
|
||||
eprintln!("Invalid UTF-16 string");
|
||||
None
|
||||
} else {
|
||||
Some(data)
|
||||
|
||||
Reference in new issue
Block a user