Skip to content

Commit 3569a1b

Browse files
committed
Rename try to avoid keyword
1 parent 95bce4e commit 3569a1b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/exception.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use objc_exception;
33
use crate::rc::StrongPtr;
44
use crate::runtime::Object;
55

6-
pub unsafe fn r#try<F, R>(closure: F) -> Result<R, StrongPtr>
6+
pub unsafe fn catch_exception<F, R>(closure: F) -> Result<R, StrongPtr>
77
where F: FnOnce() -> R {
88
objc_exception::r#try(closure).map_err(|exception| {
99
StrongPtr::new(exception as *mut Object)

src/message/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::{Encode, EncodeArguments};
99
#[cfg(feature = "exception")]
1010
macro_rules! objc_try {
1111
($b:block) => (
12-
$crate::exception::r#try(|| $b).map_err(|exception|
12+
$crate::exception::catch_exception(|| $b).map_err(|exception|
1313
if exception.is_null() {
1414
MessageError("Uncaught exception nil".to_owned())
1515
} else {

0 commit comments

Comments
 (0)