Remove private prelude module from units crate

The private prelude module has been removed from the units crate and
instead imports are stated in full when needed.
This commit is contained in:
Jamil Lambert, PhD 2024-07-09 10:43:25 +01:00
parent 4507cd1fe7
commit 1cce1b5aa6
2 changed files with 2 additions and 12 deletions

View File

@ -59,13 +59,3 @@ pub use self::{
parse::ParseIntError, parse::ParseIntError,
weight::Weight weight::Weight
}; };
#[rustfmt::skip]
#[allow(unused_imports)]
mod prelude {
#[cfg(all(feature = "alloc", not(feature = "std")))]
pub use alloc::{string::{String, ToString}, vec::Vec, boxed::Box, borrow::{Borrow, BorrowMut, Cow, ToOwned}, slice, rc};
#[cfg(feature = "std")]
pub use std::{string::{String, ToString}, vec::Vec, boxed::Box, borrow::{Borrow, BorrowMut, Cow, ToOwned}, rc};
}

View File

@ -2,6 +2,8 @@
//! Provides type `Height` and `Time` types used by the `rust-bitcoin` `absolute::LockTime` type. //! Provides type `Height` and `Time` types used by the `rust-bitcoin` `absolute::LockTime` type.
#[cfg(feature = "alloc")]
use alloc::{string::String, boxed::Box};
use core::fmt; use core::fmt;
use internals::write_err; use internals::write_err;
@ -9,8 +11,6 @@ use internals::write_err;
#[cfg(feature = "alloc")] #[cfg(feature = "alloc")]
use crate::parse; use crate::parse;
use crate::parse::ParseIntError; use crate::parse::ParseIntError;
#[cfg(feature = "alloc")]
use crate::prelude::{Box, String};
/// The Threshold for deciding whether a lock time value is a height or a time (see [Bitcoin Core]). /// The Threshold for deciding whether a lock time value is a height or a time (see [Bitcoin Core]).
/// ///