Simplify some iterator combinators

This commit is contained in:
Michael Goulet 2022-12-10 20:31:01 +00:00
parent c7572670a1
commit 7690fe3bc6
12 changed files with 91 additions and 135 deletions

View file

@ -253,7 +253,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
pub fn rvalue_as_function(&self, value: RValue<'gcc>) -> Function<'gcc> {
let function: Function<'gcc> = unsafe { std::mem::transmute(value) };
debug_assert!(self.functions.borrow().values().find(|value| **value == function).is_some(),
debug_assert!(self.functions.borrow().values().any(|value| *value == function),
"{:?} ({:?}) is not a function", value, value.get_type());
function
}