From a462a4d8550fa9fc595aae54a76b1b76fee3d9f8 Mon Sep 17 00:00:00 2001 From: orxfun Date: Tue, 11 Feb 2025 04:28:14 +0100 Subject: [PATCH 1/3] fix/broken-box-impl --- src/implementations/pointers.rs | 1 + src/lib.rs | 2 +- tests/derive.rs | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/implementations/pointers.rs b/src/implementations/pointers.rs index fe9a0b2..c8f17f7 100644 --- a/src/implementations/pointers.rs +++ b/src/implementations/pointers.rs @@ -1,4 +1,5 @@ use crate::impl_new_from_pseudo_default; +use alloc::boxed::Box; use core::{ cell::{RefCell, UnsafeCell}, mem::ManuallyDrop, diff --git a/src/lib.rs b/src/lib.rs index 106ee75..4c215c3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -125,7 +125,7 @@ //! //! Similar to `Default`, it is possible to derive `PseudoDefault` provided that all members also implement `PseudoDefault`. //! -//! ```rust +//! ```rust ignore //! use orx_pseudo_default::*; //! //! #[derive(PseudoDefault)] diff --git a/tests/derive.rs b/tests/derive.rs index a65bfd9..f218269 100644 --- a/tests/derive.rs +++ b/tests/derive.rs @@ -1,5 +1,6 @@ -extern crate alloc; +#![cfg(feature = "derive")] +extern crate alloc; use alloc::string::String; use orx_pseudo_default::*; From 1b319a5bd0f2417516ef059e50f867f071ecb9a3 Mon Sep 17 00:00:00 2001 From: orxfun Date: Tue, 11 Feb 2025 04:28:32 +0100 Subject: [PATCH 2/3] version incremented --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7ef44ec..59ce4be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "orx-pseudo-default" -version = "1.5.0" +version = "1.6.0" edition = "2021" authors = ["orxfun "] description = "PseudoDefault trait allows to create a cheap default instance of a type, which does not claim to be useful." From c87a6ec17920eb449dae1d6920253b1e4d392bc8 Mon Sep 17 00:00:00 2001 From: orxfun Date: Tue, 11 Feb 2025 04:34:08 +0100 Subject: [PATCH 3/3] version incremented to v2 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 59ce4be..5445d4d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "orx-pseudo-default" -version = "1.6.0" +version = "2.0.0" edition = "2021" authors = ["orxfun "] description = "PseudoDefault trait allows to create a cheap default instance of a type, which does not claim to be useful."