Fix some warnings

This commit is contained in:
Shunsuke Shibayama 2022-08-13 07:22:00 +09:00
parent 6726d93f65
commit 2bba7f741c
14 changed files with 64 additions and 35 deletions

View file

@ -317,7 +317,7 @@ impl CodeObj {
) -> std::io::Result<()> {
let mut file = File::create(path)?;
let mut bytes = Vec::with_capacity(16);
let python_ver = python_ver.unwrap_or_else(|| detect_magic_number());
let python_ver = python_ver.unwrap_or_else(detect_magic_number);
bytes.append(&mut get_magic_num_bytes(python_ver).to_vec());
bytes.append(&mut vec![0; 4]); // padding
bytes.append(&mut get_timestamp_bytes().to_vec());