From fa4944817087f84f3569e958d23ae61a09a71c04 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 27 Aug 2024 18:46:01 -0400 Subject: [PATCH] rust: Squash two minor build warnings - Suppress a dead code warning on the tokio guard; it's just there for drop semantics. - Delete an unused function. --- rust/src/tokio_ffi.rs | 1 + rust/src/utils.rs | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/rust/src/tokio_ffi.rs b/rust/src/tokio_ffi.rs index 62d9600a9e..ba3505b4ca 100644 --- a/rust/src/tokio_ffi.rs +++ b/rust/src/tokio_ffi.rs @@ -3,6 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 OR MIT pub(crate) struct TokioHandle(tokio::runtime::Handle); +#[allow(dead_code)] pub(crate) struct TokioEnterGuard<'a>(tokio::runtime::EnterGuard<'a>); pub(crate) fn tokio_handle_get() -> Box { diff --git a/rust/src/utils.rs b/rust/src/utils.rs index 380527c038..4930b1912e 100644 --- a/rust/src/utils.rs +++ b/rust/src/utils.rs @@ -640,17 +640,6 @@ pub(crate) fn calculate_advisories_diff( Ok(p as *mut _) } -pub(crate) fn print_treepkg_diff(sysroot: &str) { - unsafe { - crate::ffi::print_treepkg_diff_from_sysroot_path( - sysroot, - crate::ffi::RpmOstreeDiffPrintFormat::RPMOSTREE_DIFF_PRINT_FORMAT_FULL_MULTILINE, - 0, - std::ptr::null_mut(), - ); - } -} - /// Implementation of https://github.com/rust-lang/rust/issues/82901 until it's stable. pub(crate) trait OptionExtGetOrInsertDefault { fn ext_get_or_insert_default(&mut self) -> &mut T;