Skip to content

Commit c180af8

Browse files
committed
Address comment
1 parent 3efe017 commit c180af8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compiler/rustc_passes/src/stability.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,10 +829,7 @@ impl Visitor<'tcx> for Checker<'tcx> {
829829
fn visit_path(&mut self, path: &'tcx hir::Path<'tcx>, id: hir::HirId) {
830830
if let Some(def_id) = path.res.opt_def_id() {
831831
let method_span = if path.segments.len() >= 2 {
832-
match path.segments.last() {
833-
Some(s) => Some(s.ident.span),
834-
None => None,
835-
}
832+
path.segments.last().map(|s| s.ident.span)
836833
} else {
837834
None
838835
};

0 commit comments

Comments
 (0)