1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 12:13:45 +00:00

convert printlns in objc crate

This commit is contained in:
neuronull
2025-09-15 19:44:20 -06:00
parent 88bd083b88
commit 07127e73a9
3 changed files with 10 additions and 3 deletions

View File

@@ -950,6 +950,7 @@ dependencies = [
"glob",
"thiserror 2.0.12",
"tokio",
"tracing",
]
[[package]]

View File

@@ -12,6 +12,7 @@ default = []
anyhow = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = "=0.10.0"

View File

@@ -66,6 +66,8 @@ impl Drop for ObjCString {
mod objc {
use std::os::raw::c_void;
use tracing::error;
use super::*;
unsafe extern "C" {
@@ -79,8 +81,9 @@ mod objc {
let value: String = match value.try_into() {
Ok(value) => value,
Err(e) => {
println!(
"Error: Failed to convert ObjCString to Rust string during commandReturn: {e}"
error!(
error = %e,
"Error: Failed to convert ObjCString to Rust string during commandReturn"
);
return false;
@@ -90,7 +93,9 @@ mod objc {
match context.send(value) {
Ok(_) => 0,
Err(e) => {
println!("Error: Failed to return ObjCString from ObjC code to Rust code: {e}");
error!(
error = %e,
"Error: Failed to return ObjCString from ObjC code to Rust code");
return false;
}