From: Matt Corallo Date: Thu, 21 Mar 2024 14:22:52 +0000 (+0000) Subject: Add more `std` prelude items to `crate::prelude` X-Git-Tag: v0.0.123-beta~16^2~5 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=061d396b074a8d8b2f7d83c316b158749e6dcdb5;p=rust-lightning Add more `std` prelude items to `crate::prelude` New rustc beta now warns on duplicate imports when one of the imports is from a wildcard import or the default prelude. Thus, for simplicity, we need to make our `crate::prelude` mostly identical to the `std` one, allowing us to always simply use the `crate::prelude` and let it decide if we need to import anything. --- diff --git a/lightning/src/lib.rs b/lightning/src/lib.rs index 1adf3786b..29fe76b49 100644 --- a/lightning/src/lib.rs +++ b/lightning/src/lib.rs @@ -170,6 +170,9 @@ mod prelude { pub use alloc::borrow::ToOwned; pub use alloc::string::ToString; + pub use core::convert::{TryFrom, TryInto}; + pub use core::marker::Sized; + pub(crate) use crate::util::hash_tables::*; }