use matches!() macro for simple if let conditions
This commit is contained in:
parent
2c69266c06
commit
40dddd3305
15 changed files with 33 additions and 36 deletions
|
@ -395,7 +395,7 @@ impl<'a, 'b> BuildReducedGraphVisitor<'a, 'b> {
|
|||
// so prefixes are prepended with crate root segment if necessary.
|
||||
// The root is prepended lazily, when the first non-empty prefix or terminating glob
|
||||
// appears, so imports in braced groups can have roots prepended independently.
|
||||
let is_glob = if let ast::UseTreeKind::Glob = use_tree.kind { true } else { false };
|
||||
let is_glob = matches!(use_tree.kind, ast::UseTreeKind::Glob);
|
||||
let crate_root = match prefix_iter.peek() {
|
||||
Some(seg) if !seg.ident.is_path_segment_keyword() && seg.ident.span.rust_2015() => {
|
||||
Some(seg.ident.span.ctxt())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue