about summary refs log tree commit diff
path: root/src/librustc_save_analysis
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-03-29 20:19:14 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2020-03-31 15:20:05 +0200
commit08f2904dfaf5e75fbcc1305c8b0aad5fae71a4ff (patch)
treec5a0e9fc7fb20a98186a484bdf83ec294476a81a /src/librustc_save_analysis
parent2113659479a82ea69633b23ef710b58ab127755e (diff)
downloadrust-08f2904dfaf5e75fbcc1305c8b0aad5fae71a4ff.tar.gz
rust-08f2904dfaf5e75fbcc1305c8b0aad5fae71a4ff.zip
more clippy fixes
use is_empty() instead of len comparison (clippy::len_zero)
use if let instead of while let loop that never loops (clippy::never_loop)
remove redundant returns (clippy::needless_return)
remove redundant closures (clippy::redundant_closure)
use if let instead of match and wildcard pattern (clippy::single_match)
don't repeat field names redundantly (clippy::redundant_field_names)
Diffstat (limited to 'src/librustc_save_analysis')
-rw-r--r--src/librustc_save_analysis/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs
index 277848a7d61..24b7be0c9b3 100644
--- a/src/librustc_save_analysis/lib.rs
+++ b/src/librustc_save_analysis/lib.rs
@@ -591,7 +591,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
                 Some(Data::RefData(Ref {
                     kind: RefKind::Function,
                     span,
-                    ref_id: def_id.or(decl_id).map(id_from_def_id).unwrap_or_else(|| null_id()),
+                    ref_id: def_id.or(decl_id).map(id_from_def_id).unwrap_or_else(null_id),
                 }))
             }
             ast::ExprKind::Path(_, ref path) => {