From fcfd5c3c505a27f63fbe4f0c7112e71882c390a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Mon, 12 Dec 2022 13:05:38 +0100 Subject: [PATCH] clippy fix: shorten bool->i32 conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit i32 implements From 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 --- src/lib.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ee842ce..bdd162b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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)), } }