1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-09 13:10:17 +00:00

fix: remove unsafe from extern functions

I was getting errors about this being unsupported.
Extern functions seem to be unsafe be definition anyways so no need to explicilty state it.
This commit is contained in:
Andreas Coroiu
2025-04-22 16:37:08 +02:00
parent d70d81dec6
commit e661985386

View File

@@ -68,13 +68,13 @@ mod objc {
use super::*;
unsafe extern "C" {
pub unsafe fn runCommand(context: *mut c_void, value: *const c_char);
pub unsafe fn freeObjCString(value: &ObjCString);
extern "C" {
pub fn runCommand(context: *mut c_void, value: *const c_char);
pub fn freeObjCString(value: &ObjCString);
}
/// This function is called from the ObjC code to return the output of the command
#[unsafe(no_mangle)]
#[no_mangle]
pub extern "C" fn commandReturn(context: &mut CommandContext, value: ObjCString) -> bool {
let value: String = match value.try_into() {
Ok(value) => value,