Add symlink for `async_poll.rs`
What changed, and why it matters
This commit adds a symbolic link (a file that points to another file) so that a shared helper file can be reused between two Rust crates. It also adjusts the helper's imports to work in both crates. There is no security-relevant change here.
No security action required. Review as normal refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change creates lightning-liquidity/src/utils/async_poll.rs as a symlink to lightning/src/util/async_poll.rs, then exposes that module in lightning-liquidity/src/utils/mod.rs with #[allow(dead_code)] and #[allow(unused_imports)]. The original async_poll.rs is updated to replace a crate-specific prelude import with explicit alloc::boxed::Box and alloc::vec::Vec imports so it compiles in the no_std/alloc context of the liquidity crate. This is a code-sharing/refactoring patch.
Changed components
lightning/src/util/async_poll.rslightning-liquidity/src/utils/async_poll.rslightning-liquidity/src/utils/mod.rsInspect captured patch +6 / −1
diff --git a/lightning-liquidity/src/utils/async_poll.rs b/lightning-liquidity/src/utils/async_poll.rs
new file mode 120000
index 0000000..9cbb5eb
--- /dev/null
+++ b/lightning-liquidity/src/utils/async_poll.rs
@@ -0,0 +1 @@
+../../../lightning/src/util/async_poll.rs
\ No newline at end of file
diff --git a/lightning-liquidity/src/utils/mod.rs b/lightning-liquidity/src/utils/mod.rs
index 637c62c..b66d3eb 100644
--- a/lightning-liquidity/src/utils/mod.rs
+++ b/lightning-liquidity/src/utils/mod.rs
@@ -7,6 +7,9 @@ use lightning::sign::EntropySource;
use crate::lsps0::ser::LSPSRequestId;
+#[allow(dead_code)]
+#[allow(unused_imports)]
+pub(crate) mod async_poll;
pub mod time;
/// Converts a human-readable string representation of a short channel ID (SCID)
diff --git a/lightning/src/util/async_poll.rs b/lightning/src/util/async_poll.rs
index 024d433..7c070f3 100644
--- a/lightning/src/util/async_poll.rs
+++ b/lightning/src/util/async_poll.rs
@@ -9,7 +9,8 @@
//! Some utilities to make working with the standard library's [`Future`]s easier
-use crate::prelude::*;
+use alloc::boxed::Box;
+use alloc::vec::Vec;
use core::future::Future;
use core::marker::Unpin;
use core::pin::Pin;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.