about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-12-12 19:28:13 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2023-12-12 19:28:13 +0100
commitd707461a1a02edd7a1f2591d62499d00b370e75f (patch)
tree30aff2861eba8a08d206c97a5e6104756c8e5abf /compiler/rustc_const_eval/src/interpret
parent27d8a577138c0d319a572cd1a464c2b755e577de (diff)
downloadrust-d707461a1a02edd7a1f2591d62499d00b370e75f.tar.gz
rust-d707461a1a02edd7a1f2591d62499d00b370e75f.zip
clippy::complexity fixes
 filter_map_identity
 needless_bool
 search_is_some
 unit_arg
 map_identity
 needless_question_mark
 derivable_impls
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
-rw-r--r--compiler/rustc_const_eval/src/interpret/visitor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/visitor.rs b/compiler/rustc_const_eval/src/interpret/visitor.rs
index 5c5a6e8db57..de0590a4b14 100644
--- a/compiler/rustc_const_eval/src/interpret/visitor.rs
+++ b/compiler/rustc_const_eval/src/interpret/visitor.rs
@@ -21,7 +21,7 @@ pub trait ValueVisitor<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>>: Sized {
     /// `read_discriminant` can be hooked for better error messages.
     #[inline(always)]
     fn read_discriminant(&mut self, v: &Self::V) -> InterpResult<'tcx, VariantIdx> {
-        Ok(self.ecx().read_discriminant(&v.to_op(self.ecx())?)?)
+        self.ecx().read_discriminant(&v.to_op(self.ecx())?)
     }
 
     /// This function provides the chance to reorder the order in which fields are visited for