File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,14 @@ use ext_php_rs::zend::Function;
16
16
17
17
#[php_function]
18
18
pub fn test_function() -> () {
19
- let substr = Function::from_function("var_dump");
20
- let _ = substr .try_call(vec!["abc"]);
19
+ let var_dump = Function::from_function("var_dump");
20
+ let _ = var_dump .try_call(vec![& "abc"]);
21
21
}
22
22
23
23
#[php_function]
24
24
pub fn test_method() -> () {
25
25
let f = Function::from_method("ClassName", "staticMethod");
26
- let _ = f.try_call(vec!["abc"]);
26
+ let _ = f.try_call(vec![& "abc"]);
27
27
}
28
28
29
29
# fn main() {}
Original file line number Diff line number Diff line change @@ -24,9 +24,8 @@ use ext_php_rs::{prelude::*, types::ZendObject};
24
24
25
25
// Take an object reference and also return it.
26
26
#[php_function]
27
- pub fn take_obj(obj: &mut ZendObject) -> &mut ZendObject {
28
- let res = obj.try_call_method("hello", vec!["arg1", "arg2"]);
29
- dbg!(res)
27
+ pub fn take_obj(obj: &mut ZendObject) -> () {
28
+ let _ = obj.try_call_method("hello", vec![&"arg1", &"arg2"]);
30
29
}
31
30
# #[php_module]
32
31
# pub fn get_module(module: ModuleBuilder) -> ModuleBuilder {
You can’t perform that action at this time.
0 commit comments