commit | 4f74b680a1ff46866de96e24ee4a38a8c34923f3 | [log] [tgz] |
---|---|---|
author | Árpád Goretity <h2co3@h2co3.org> | Sat Jul 14 00:47:51 2018 +0200 |
committer | Árpád Goretity <h2co3@h2co3.org> | Sat Jul 14 00:47:51 2018 +0200 |
tree | d7ca12bae26140fc0ededae9ccd32be2b4858b4c | |
parent | b761e47aad488c96baa834641d471b86bbf8829f [diff] [blame] |
impl Default for TokenStream
diff --git a/src/lib.rs b/src/lib.rs index 67f8033..9930c3c 100644 --- a/src/lib.rs +++ b/src/lib.rs
@@ -118,6 +118,14 @@ } } +/// `TokenStream::default()` returns an empty stream, +/// i.e. this is equivalent with `TokenStream::new()`. +impl Default for TokenStream { + fn default() -> Self { + TokenStream::new() + } +} + /// Attempts to break the string into tokens and parse those tokens into a token /// stream. ///