Skip to content

Commit f1374a7

Browse files
committed
libsyntax: add Default implementation to OptVec
1 parent 4a73c8e commit f1374a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libsyntax/opt_vec.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ impl<A:Eq> Eq for OptVec<A> {
140140
}
141141
}
142142

143+
impl<T> Default for OptVec<T> {
144+
fn default() -> OptVec<T> { Empty }
145+
}
146+
143147
pub struct OptVecIterator<'self, T> {
144148
priv iter: Option<VecIterator<'self, T>>
145149
}

0 commit comments

Comments
 (0)