From e6e3a28c9740b08f77cbb7744f91ea646d1c089f Mon Sep 17 00:00:00 2001 From: Larry Dewey Date: Mon, 17 Jun 2024 10:49:07 -0500 Subject: [PATCH] Fix KBS AS build warning This introduces a compiler feature check for `as` when importing `sync::Arc`. This removes the `unused_imports` warning when building as specified in #419. Resolves: #419 Signed-off-by: Larry Dewey --- kbs/src/api/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kbs/src/api/src/lib.rs b/kbs/src/api/src/lib.rs index 1e8866c7f..1eb7523e8 100644 --- a/kbs/src/api/src/lib.rs +++ b/kbs/src/api/src/lib.rs @@ -25,8 +25,9 @@ use jwt_simple::prelude::Ed25519PublicKey; #[cfg(feature = "resource")] use resource::RepositoryConfig; use semver::{BuildMetadata, Prerelease, Version, VersionReq}; -use std::path::PathBuf; -use std::{net::SocketAddr, sync::Arc}; +#[cfg(feature = "as")] +use std::sync::Arc; +use std::{net::SocketAddr, path::PathBuf}; #[cfg(feature = "resource")] use token::AttestationTokenVerifierConfig;