diff --git a/crates/lang/ir/src/ir/selector.rs b/crates/lang/ir/src/ir/selector.rs index a4455894b4d..3f875a440bb 100644 --- a/crates/lang/ir/src/ir/selector.rs +++ b/crates/lang/ir/src/ir/selector.rs @@ -50,13 +50,7 @@ impl Selector { /// Returns the 4 bytes that make up the selector as hex encoded bytes. pub fn hex_lits(self) -> [syn::LitInt; 4] { - let selector_bytes = self.as_bytes(); - [ - selector_bytes[0].hex_padded_suffixed(), - selector_bytes[1].hex_padded_suffixed(), - selector_bytes[2].hex_padded_suffixed(), - selector_bytes[3].hex_padded_suffixed(), - ] + self.bytes.map(::hex_padded_suffixed) } }