Extract an &mut so we don't do it every time

This commit is contained in:
Richard Feldman 2022-11-20 07:00:30 -05:00
parent 066eb38043
commit 2cc6a16dd1
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B

View file

@ -2264,17 +2264,19 @@ fn update<'a>(
let mut header = header;
if !header.module_id.is_builtin() {
extend_header_with_builtin(&mut header, ModuleId::NUM);
extend_header_with_builtin(&mut header, ModuleId::BOOL);
extend_header_with_builtin(&mut header, ModuleId::STR);
extend_header_with_builtin(&mut header, ModuleId::LIST);
extend_header_with_builtin(&mut header, ModuleId::RESULT);
extend_header_with_builtin(&mut header, ModuleId::DICT);
extend_header_with_builtin(&mut header, ModuleId::SET);
extend_header_with_builtin(&mut header, ModuleId::BOX);
extend_header_with_builtin(&mut header, ModuleId::ENCODE);
extend_header_with_builtin(&mut header, ModuleId::DECODE);
extend_header_with_builtin(&mut header, ModuleId::HASH);
let header = &mut header;
extend_header_with_builtin(header, ModuleId::NUM);
extend_header_with_builtin(header, ModuleId::BOOL);
extend_header_with_builtin(header, ModuleId::STR);
extend_header_with_builtin(header, ModuleId::LIST);
extend_header_with_builtin(header, ModuleId::RESULT);
extend_header_with_builtin(header, ModuleId::DICT);
extend_header_with_builtin(header, ModuleId::SET);
extend_header_with_builtin(header, ModuleId::BOX);
extend_header_with_builtin(header, ModuleId::ENCODE);
extend_header_with_builtin(header, ModuleId::DECODE);
extend_header_with_builtin(header, ModuleId::HASH);
}
state