Skip to content

Commit 09588fa

Browse files
committed
fix: resolve review problems
1 parent 79d8710 commit 09588fa

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/event.rs

+2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ pub enum Event<'a, T: 'static> {
101101
},
102102

103103
/// Emitted when open an external file with the app
104+
///
104105
/// ## Platform-specific
106+
///
105107
/// - **Windows / Android / Linux:** Unsupported.
106108
OpenFile(PathBuf),
107109

src/platform_impl/macos/app_delegate.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use crate::{platform::macos::ActivationPolicy, platform_impl::platform::app_state::AppState};
55

66
use cocoa::{
7-
base::{id, YES},
7+
base::{id, YES, BOOL},
88
foundation::NSString,
99
};
1010
use objc::{
@@ -51,7 +51,7 @@ lazy_static! {
5151
);
5252
decl.add_method(
5353
sel!(application:openFile:),
54-
application_open_file as extern "C" fn(&Object, Sel, id, id) -> i8,
54+
application_open_file as extern "C" fn(&Object, Sel, id, id) -> BOOL,
5555
);
5656
decl.add_ivar::<*mut c_void>(AUX_DELEGATE_STATE_NAME);
5757

@@ -102,7 +102,7 @@ extern "C" fn application_will_terminate(_: &Object, _: Sel, _: id) {
102102
trace!("Completed `applicationWillTerminate`");
103103
}
104104

105-
extern "C" fn application_open_file(_: &Object, _: Sel, _: id, file: id) -> i8 {
105+
extern "C" fn application_open_file(_: &Object, _: Sel, _: id, file: id) -> BOOL {
106106
let path_string = unsafe { CStr::from_ptr(file.UTF8String()).to_string_lossy() };
107107

108108
let path = PathBuf::from(path_string.as_ref());

0 commit comments

Comments
 (0)