We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f427365 commit 25a20e0Copy full SHA for 25a20e0
src/lib.rs
@@ -1290,6 +1290,10 @@ pub mod token_stream {
1290
fn next(&mut self) -> Option<TokenTree> {
1291
self.inner.next()
1292
}
1293
+
1294
+ fn size_hint(&self) -> (usize, Option<usize>) {
1295
+ self.inner.size_hint()
1296
+ }
1297
1298
1299
impl Debug for IntoIter {
tests/test.rs
@@ -551,7 +551,7 @@ fn default_tokenstream_is_empty() {
551
fn tokenstream_size_hint() {
552
let tokens = "a b (c d) e".parse::<TokenStream>().unwrap();
553
554
- assert_eq!(tokens.into_iter().size_hint(), (0, None)); // FIXME
+ assert_eq!(tokens.into_iter().size_hint(), (4, Some(4)));
555
556
557
#[test]
0 commit comments