clippy fix: shorten bool->i32 conversion

i32 implements From<bool> with the desired semantics, this still makes it
obvious that the conversion happens, although a plain `.into()` would also
work.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2022-12-12 13:05:38 +01:00 committed by Wolfgang Bumiller
parent dd65c43862
commit fcfd5c3c50

View File

@ -417,13 +417,7 @@ pub extern "C" fn proxmox_backup_check_incremental(
match tools::utf8_c_string_lossy(device_name) {
None => 0,
Some(device_name) => {
if task.check_incremental(device_name, size) {
1
} else {
0
}
}
Some(device_name) => i32::from(task.check_incremental(device_name, size)),
}
}