Skip to content

Commit 0e4b612

Browse files
Rollup merge of rust-lang#155003 - malezjaa:update-thinvec, r=davidtwco
update thin-vec With thin-vec v0.2.15 released, copy-pasted implementation of ExtractIf can be removed.
2 parents fb16ce7 + cf6aa22 commit 0e4b612

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

clippy_lints/src/unnested_or_patterns.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use rustc_ast::mut_visit::*;
1010
use rustc_ast::{self as ast, DUMMY_NODE_ID, Mutability, Pat, PatKind, Pinnedness};
1111
use rustc_ast_pretty::pprust;
1212
use rustc_data_structures::thin_vec::{ThinVec, thin_vec};
13-
use rustc_data_structures::thinvec::ExtractIf;
1413
use rustc_errors::Applicability;
1514
use rustc_lint::{EarlyContext, EarlyLintPass};
1615
use rustc_session::impl_lint_pass;
@@ -422,9 +421,7 @@ fn drain_matching(
422421
let mut tail_or = ThinVec::new();
423422
let mut idx = 0;
424423

425-
// FIXME: once `thin-vec` releases a new version, change this to `alternatives.extract_if()`
426-
// See https://github.com/mozilla/thin-vec/issues/77
427-
for pat in ExtractIf::new(alternatives, |p| {
424+
for pat in alternatives.extract_if(.., |p| {
428425
// Check if we should extract, but only if `idx >= start`.
429426
idx += 1;
430427
idx > start && predicate(&p.kind)

0 commit comments

Comments
 (0)