diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-09-09 19:29:31 -0700 |
|---|---|---|
| committer | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-09-12 18:54:12 -0700 |
| commit | f1374a7044d844fb1f89b651bf4c628ac32ed48a (patch) | |
| tree | b0e8714a7ea89b1ccf176b7229eda7bc0141c35b /src/libsyntax | |
| parent | 4a73c8eac7660735822f7d43ac8be2b40b2e1d93 (diff) | |
| download | rust-f1374a7044d844fb1f89b651bf4c628ac32ed48a.tar.gz rust-f1374a7044d844fb1f89b651bf4c628ac32ed48a.zip | |
libsyntax: add Default implementation to OptVec
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/opt_vec.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/opt_vec.rs b/src/libsyntax/opt_vec.rs index 2d7801a22de..46940d2d4da 100644 --- a/src/libsyntax/opt_vec.rs +++ b/src/libsyntax/opt_vec.rs @@ -140,6 +140,10 @@ impl<A:Eq> Eq for OptVec<A> { } } +impl<T> Default for OptVec<T> { + fn default() -> OptVec<T> { Empty } +} + pub struct OptVecIterator<'self, T> { priv iter: Option<VecIterator<'self, T>> } |
