From 95c7174ca1a297db6cd8678de593a11ed95c0056 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Tue, 24 Oct 2023 12:58:39 -0700 Subject: [PATCH 1/3] Fix nightly lints on unused internal exports --- soroban-sdk/src/env.rs | 1 - soroban-sdk/src/storage.rs | 3 --- soroban-sdk/src/testutils.rs | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/soroban-sdk/src/env.rs b/soroban-sdk/src/env.rs index f520ab262..1232ac09a 100644 --- a/soroban-sdk/src/env.rs +++ b/soroban-sdk/src/env.rs @@ -83,7 +83,6 @@ pub mod testutils { pub use super::internal::LedgerInfo; } -pub use internal::meta; pub use internal::xdr; pub use internal::Compare; pub use internal::ConversionError; diff --git a/soroban-sdk/src/storage.rs b/soroban-sdk/src/storage.rs index 040740bdb..d9c22caf9 100644 --- a/soroban-sdk/src/storage.rs +++ b/soroban-sdk/src/storage.rs @@ -483,6 +483,3 @@ mod testutils { map } } -#[cfg(any(test, feature = "testutils"))] -#[cfg_attr(feature = "docs", doc(cfg(feature = "testutils")))] -pub use testutils::*; diff --git a/soroban-sdk/src/testutils.rs b/soroban-sdk/src/testutils.rs index bc9ef4852..9dcc180d9 100644 --- a/soroban-sdk/src/testutils.rs +++ b/soroban-sdk/src/testutils.rs @@ -21,7 +21,7 @@ pub trait ContractFunctionSet { } #[doc(inline)] -pub use crate::env::internal::LedgerInfo; +pub use crate::env::testutils::*; /// Test utilities for [`Ledger`][crate::ledger::Ledger]. pub trait Ledger { From f733602cc407230b411fd861ab7cab2dc378137d Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Tue, 24 Oct 2023 13:06:31 -0700 Subject: [PATCH 2/3] fix --- soroban-sdk/src/env.rs | 8 -------- soroban-sdk/src/testutils.rs | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/soroban-sdk/src/env.rs b/soroban-sdk/src/env.rs index 1232ac09a..962b8b6b7 100644 --- a/soroban-sdk/src/env.rs +++ b/soroban-sdk/src/env.rs @@ -75,14 +75,6 @@ pub mod internal { } } -// Testutils from the environment are pub here, and then pub re-exported out of -// the SDK in the crate::testutils mod. -#[cfg(any(test, feature = "testutils"))] -pub mod testutils { - pub use super::internal::budget::Budget; - pub use super::internal::LedgerInfo; -} - pub use internal::xdr; pub use internal::Compare; pub use internal::ConversionError; diff --git a/soroban-sdk/src/testutils.rs b/soroban-sdk/src/testutils.rs index 9dcc180d9..bc9ef4852 100644 --- a/soroban-sdk/src/testutils.rs +++ b/soroban-sdk/src/testutils.rs @@ -21,7 +21,7 @@ pub trait ContractFunctionSet { } #[doc(inline)] -pub use crate::env::testutils::*; +pub use crate::env::internal::LedgerInfo; /// Test utilities for [`Ledger`][crate::ledger::Ledger]. pub trait Ledger { From 5ea40ce82f730d6232d32c5d6bc49219c112ce0f Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Tue, 24 Oct 2023 13:09:20 -0700 Subject: [PATCH 3/3] fix --- soroban-sdk/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soroban-sdk/src/lib.rs b/soroban-sdk/src/lib.rs index 935bf5b04..30d512da3 100644 --- a/soroban-sdk/src/lib.rs +++ b/soroban-sdk/src/lib.rs @@ -104,7 +104,7 @@ mod alloc; #[export_name = "_"] fn __link_sections() { #[link_section = "contractenvmetav0"] - static __ENV_META_XDR: [u8; env::meta::XDR.len()] = env::meta::XDR; + static __ENV_META_XDR: [u8; env::internal::meta::XDR.len()] = env::internal::meta::XDR; soroban_sdk_macros::contractmetabuiltin!(); }