File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use fmt;
1212use marker;
1313use usize;
1414
15- use super :: FusedIterator ;
15+ use super :: { FusedIterator , TrustedLen } ;
1616
1717/// An iterator that repeats an element endlessly.
1818///
@@ -138,6 +138,9 @@ impl<T> ExactSizeIterator for Empty<T> {
138138 }
139139}
140140
141+ #[ unstable( feature = "trusted_len" , issue = "37572" ) ]
142+ unsafe impl < T > TrustedLen for Empty < T > { }
143+
141144#[ unstable( feature = "fused" , issue = "35602" ) ]
142145impl < T > FusedIterator for Empty < T > { }
143146
@@ -216,6 +219,9 @@ impl<T> ExactSizeIterator for Once<T> {
216219 }
217220}
218221
222+ #[ unstable( feature = "trusted_len" , issue = "37572" ) ]
223+ unsafe impl < T > TrustedLen for Once < T > { }
224+
219225#[ unstable( feature = "fused" , issue = "35602" ) ]
220226impl < T > FusedIterator for Once < T > { }
221227
You can’t perform that action at this time.
0 commit comments