Skip to content

Commit 901760d

Browse files
committed
Remove comments and unnecessary code
1 parent 150a5ce commit 901760d

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

tests/src/integration/variadic_args.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020

2121
// Must have arguments.. so catch ArgumentCountError errors!
2222
assert_exception_thrown('test_variadic_args');
23-
// try {
24-
// $args = test_variadic_args();
25-
// } catch (ArgumentCountError $e) {
26-
// var_dump($e->getMessage());
27-
// }
2823

2924
// Values directly passed
3025
test_variadic_add_optional(1, 2, 3); // 1

tests/src/lib.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,11 @@ pub fn test_variadic_args(params: &[&Zval]) -> Vec<Zval> {
9090

9191
#[php_function(optional = "numbers")]
9292
pub fn test_variadic_add_optional(number: u32, numbers: &[&Zval]) -> u32 {
93-
println!("Optional numbers: {:?}", numbers);
94-
// numbers is a slice of 4 Zvals all of type long
9593
number
9694
}
9795

9896
#[php_function]
9997
pub fn test_variadic_add_required(numbers: &[&Zval]) -> Vec<Zval> {
100-
// numbers is a slice of 4 Zvals all of type long
101-
// *numbers[0].as_number()
10298
numbers.iter().map(|x| x.shallow_clone()).collect()
10399
}
104100

@@ -107,17 +103,6 @@ pub fn test_variadic_all_types(everything: &[&Zval]) -> Vec<Zval> {
107103
everything.iter().map(|x| x.shallow_clone()).collect()
108104
}
109105

110-
// Rust type &[&Zval] must be converted because to Vec<Zval> because
111-
// of lifetime hell... #[php_function] does not support lifetime.
112-
// error1: error[E0261]: use of undeclared lifetime name `'a`
113-
// error2: lifetime `'a` is missing in item created through this procedural
114-
// macro #[php_function]
115-
// pub fn test_variadic_optional_args<'a>(params: &'a [&'a Zval]) -> &'a [&'a
116-
// Zval] {
117-
// println!("Params: {:#?}", params);
118-
// params
119-
// }
120-
121106
#[php_class]
122107
pub struct TestClass {
123108
string: String,

0 commit comments

Comments
 (0)