Skip to content

Commit 4c2406f

Browse files
committed
impl ParseParameter for ().
1 parent 515167a commit 4c2406f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

phper/src/zend/types.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,24 @@ pub trait ParseParameter: Sized {
108108
}
109109
}
110110

111+
impl ParseParameter for () {
112+
fn spec() -> Cow<'static, str> {
113+
Cow::Borrowed("")
114+
}
115+
116+
fn num_parameters() -> usize {
117+
0
118+
}
119+
120+
fn parameters() -> Vec<*mut c_void> {
121+
Vec::new()
122+
}
123+
124+
fn from_parameters(_parameters: &[*mut c_void]) -> Option<Self> {
125+
Some(())
126+
}
127+
}
128+
111129
impl ParseParameter for bool {
112130
#[inline]
113131
fn spec() -> Cow<'static, str> {

0 commit comments

Comments
 (0)