Skip to content

Commit 74f2200

Browse files
committed
Remove slow_extend codepath
This was originally used on rustc 1.29 which we no longer support.
1 parent 7f21087 commit 74f2200

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/wrapper.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -229,24 +229,10 @@ impl Extend<TokenStream> for TokenStream {
229229
fn extend<I: IntoIterator<Item = TokenStream>>(&mut self, streams: I) {
230230
match self {
231231
TokenStream::Compiler(tts) => {
232-
#[cfg(not(slow_extend))]
233-
{
234-
tts.extend(streams.into_iter().map(|stream| stream.unwrap_nightly()));
235-
}
236-
#[cfg(slow_extend)]
237-
{
238-
*tts = tts
239-
.clone()
240-
.into_iter()
241-
.chain(streams.into_iter().flat_map(|t| match t {
242-
TokenStream::Compiler(tts) => tts.into_iter(),
243-
_ => mismatch(),
244-
}))
245-
.collect();
246-
}
232+
tts.extend(streams.into_iter().map(|stream| stream.unwrap_nightly()));
247233
}
248234
TokenStream::Fallback(tts) => {
249-
tts.extend(streams.into_iter().map(|stream| stream.unwrap_stable()))
235+
tts.extend(streams.into_iter().map(|stream| stream.unwrap_stable()));
250236
}
251237
}
252238
}

0 commit comments

Comments
 (0)