Fix #364: remove spurious eprintln! for null pointer in UTF-16 string conversion (#425)

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:
authored and GitHub committed 2026-06-27 23:17:52 -07:00
1 parent 9c336fa9ae
commit e8520ce679
1 file changed
+1 -3
+1 -3
View File
@@ -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)