Skip to content

Commit 538a21a

Browse files
committed
Add default impl for VaList
1 parent 1305c97 commit 538a21a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

libcc2rs/src/va_args.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ pub struct VaList<'a> {
4949
}
5050

5151
impl<'a> VaList<'a> {
52-
pub fn empty() -> Self {
53-
VaList { args: &[], pos: 0 }
54-
}
55-
5652
pub fn new(args: &'a [VaArg]) -> Self {
5753
VaList { args, pos: 0 }
5854
}
@@ -64,6 +60,12 @@ impl<'a> VaList<'a> {
6460
}
6561
}
6662

63+
impl Default for VaList<'_> {
64+
fn default() -> Self {
65+
VaList { args: &[], pos: 0 }
66+
}
67+
}
68+
6769
impl Clone for VaList<'_> {
6870
fn clone(&self) -> Self {
6971
VaList {

0 commit comments

Comments
 (0)