Skip to content

Commit 714b155

Browse files
committed
Fixes
1 parent 4b82171 commit 714b155

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

guide/src/types/functions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ use ext_php_rs::zend::Function;
1616
1717
#[php_function]
1818
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"]);
2121
}
2222
2323
#[php_function]
2424
pub fn test_method() -> () {
2525
let f = Function::from_method("ClassName", "staticMethod");
26-
let _ = f.try_call(vec!["abc"]);
26+
let _ = f.try_call(vec![&"abc"]);
2727
}
2828
2929
# fn main() {}

guide/src/types/object.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ use ext_php_rs::{prelude::*, types::ZendObject};
2424
2525
// Take an object reference and also return it.
2626
#[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"]);
3029
}
3130
# #[php_module]
3231
# pub fn get_module(module: ModuleBuilder) -> ModuleBuilder {

0 commit comments

Comments
 (0)