Skip to content

Commit 4cd4a20

Browse files
committed
Cleanup
1 parent c8c1df0 commit 4cd4a20

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

crates/macros/src/method.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ fn build_args(
376376
is_str = t.path.is_ident("str");
377377
}
378378
}
379+
}
379380
hack_tokens.append_all(if is_str {
380381
if is_option {
381382
quote! { let #param = #param.and_then(|__temp| Some(unsafe { ::core::mem::transmute::<&str, &'static str>(__temp) })); }
@@ -389,7 +390,7 @@ fn build_args(
389390
quote! { let #param = unsafe { ::ext_php_rs::zend::borrow_unchecked(#param) }; }
390391
}
391392
});
392-
}
393+
393394

394395
let default = defaults.get(&name);
395396
let mut ty = ty.ty.clone();

src/args.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ impl<'a> Arg<'a> {
123123
/// # Parameters
124124
///
125125
/// * `params` - A list of parameters to call the function with.
126+
#[inline(always)]
126127
pub fn try_call(&self, params: Vec<&dyn IntoZvalDyn>) -> Result<Zval> {
127128
self.zval.as_ref().ok_or(Error::Callable)?.try_call(params)
128129
}

src/types/callable.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ impl<'a> ZendCallable<'a> {
9999
/// let result = strpos.try_call(vec![&"hello", &"e"]).unwrap();
100100
/// assert_eq!(result.long(), Some(1));
101101
/// ```
102+
#[inline(always)]
102103
pub fn try_call(&self, params: Vec<&dyn IntoZvalDyn>) -> Result<Zval> {
103104
if !self.0.is_callable() {
104105
return Err(Error::Callable);

src/types/zval.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ impl Zval {
262262
/// # Parameters
263263
///
264264
/// * `params` - A list of parameters to call the function with.
265+
#[inline(always)]
265266
pub fn try_call(&self, params: Vec<&dyn IntoZvalDyn>) -> Result<Zval> {
266267
self.callable().ok_or(Error::Callable)?.try_call(params)
267268
}

0 commit comments

Comments
 (0)