diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-10-26 20:02:06 -0400 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-10-30 10:12:56 -0400 |
| commit | bfecb18771aa0249efe05dd7c35fa232f180bb70 (patch) | |
| tree | e7362add81a4839a9b4d30896210b30a58e9edff /compiler/rustc_metadata/src/rmeta/decoder | |
| parent | 388ef349043f20a1a8a3011eaf49dee220485e0a (diff) | |
| download | rust-bfecb18771aa0249efe05dd7c35fa232f180bb70.tar.gz rust-bfecb18771aa0249efe05dd7c35fa232f180bb70.zip | |
Fix some more clippy warnings
Diffstat (limited to 'compiler/rustc_metadata/src/rmeta/decoder')
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs index 68faf9c7a62..b5fb850e92e 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs @@ -220,10 +220,7 @@ provide! { <'tcx> tcx, def_id, other, cdata, missing_lang_items => { cdata.get_missing_lang_items(tcx) } missing_extern_crate_item => { - let r = match *cdata.extern_crate.borrow() { - Some(extern_crate) if !extern_crate.is_direct() => true, - _ => false, - }; + let r = matches!(*cdata.extern_crate.borrow(), Some(extern_crate) if !extern_crate.is_direct()); r } @@ -254,9 +251,11 @@ pub fn provide(providers: &mut Providers) { } _ => false, }, - is_statically_included_foreign_item: |tcx, id| match tcx.native_library_kind(id) { - Some(NativeLibKind::StaticBundle | NativeLibKind::StaticNoBundle) => true, - _ => false, + is_statically_included_foreign_item: |tcx, id| { + matches!( + tcx.native_library_kind(id), + Some(NativeLibKind::StaticBundle | NativeLibKind::StaticNoBundle) + ) }, native_library_kind: |tcx, id| { tcx.native_libraries(id.krate) |
