Skip to content

Commit 9aa1795

Browse files
committed
1. Removed obsolete assembly definition constants, removed obsolete hook root module, removed many obsolete functions.
2. Library version changed to 1.0.0 (was 0.1.6) 3. Removed build flag `enable_deprecated_hook` and all related comments. 4. Many comments related to additional flags to avoid false warnings during "cargo check" have been changed from "ignore" to "no_run" | `text` 5. Fixed build flag `support_panic_trig` during tests. 6. Removed the warning that obsolete functions and modules will be removed by version 1.0.0 !!! At this stage, the state of the library's API is stabilized, a huge amount of obsolete code is associated with the early use of the library ((`0.1.0-0.1.6`) 8 old versions of which only 4 were published) in many projects. !!! If it is not possible to update the application code to the new library, use the latest version 0.1.6 marked with deprecated code. *_---
1 parent c4f075b commit 9aa1795

File tree

9 files changed

+8
-355
lines changed

9 files changed

+8
-355
lines changed

Cargo.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "SafeManuallyDrop"
3-
version = "0.1.8"
3+
version = "1.0.0"
44
authors = ["Denis Kotlyarov (Денис Котляров) <[email protected]>"]
55
repository = "https://github.com/clucompany/SafeManuallyDrop.git"
66
edition = "2021"
@@ -22,10 +22,6 @@ default = [
2222
# i.e. with traceable behavior.
2323
#"always_safe_manuallydrop",
2424

25-
# For compatibility with older software, create a separate crate::core::hook
26-
# instead of the new crate::core::trig::hook.
27-
"enable_deprecated_hook",
28-
2925
# Mark functions as unsafe even if they are safe
3026
# for std API compatibility.
3127
"always_compatible_stdapi",
@@ -84,7 +80,6 @@ support_count_trig = []
8480
support_panic_trig = []
8581
support_istrig_loop = []
8682

87-
enable_deprecated_hook = []
8883
always_compatible_stdapi = []
8984

9085
always_deftrig_panic = []

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,6 @@ fn main() {
166166
// i.e. with traceable behavior.
167167
#"always_safe_manuallydrop"
168168
169-
// For compatibility with older software, create a separate crate::core::hook
170-
// instead of the new crate::core::trig::hook.
171-
"enable_deprecated_hook"
172-
173169
// Mark functions as unsafe even if they are safe
174170
// for std API compatibility.
175171
"always_compatible_stdapi"

src/beh/auto.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ cfg_if_safemode! {
124124
/// an unprotected version of ManuallyDrop with a default trigger.
125125
///
126126
/// features:
127-
/// ```ignore
127+
/// ```no_run
128128
/// if always_safe_manuallydrop | ( always_check_in_case_debug_assertions && debug_assertions ) -> SafeManuallyDrop
129129
/// else -> UnsafeManuallyDrop
130130
/// ```
131131
///
132132
/// current:
133-
/// ```ignore
133+
/// ```no_run
134134
/// UnsafeManuallyDrop
135135
/// ```
136136
#if_not_safe(pub type AutoSafeManuallyDrop<T, Trig> = crate::beh::r#unsafe::UnsafeManuallyDrop<T, Trig>;)
@@ -140,13 +140,13 @@ cfg_if_safemode! {
140140
/// an unprotected version of ManuallyDrop with a default trigger.
141141
///
142142
/// features:
143-
/// ```ignore
143+
/// ```text
144144
/// if always_safe_manuallydrop | ( always_check_in_case_debug_assertions && debug_assertions ) -> SafeManuallyDrop
145145
/// else -> UnsafeManuallyDrop
146146
/// ```
147147
///
148148
/// current:
149-
/// ```ignore
149+
/// ```text
150150
/// SafeManuallyDrop
151151
/// ```
152152
#if_safe(pub type AutoSafeManuallyDrop<T, Trig> = crate::beh::safe::SafeManuallyDrop<T, Trig>;)

src/core/flags.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
/// an unprotected version of ManuallyDrop with a default trigger.
44
pub const IS_SAFE_MODE: bool = crate::ManuallyDrop::is_safe_mode();
55

6-
#[doc(hidden)]
7-
#[deprecated(since = "0.1.5", note = "Use `IS_SUPPORT_PANIC_TRIG` instead")]
8-
/// Whether the library build flag was used to support panic_trig.
9-
pub const SUPPORT_PANIC_TRIG: bool = IS_SUPPORT_PANIC_TRIG;
10-
116
/// Whether the library build flag was used to support panic_trig.
127
pub const IS_SUPPORT_PANIC_TRIG: bool = {
138
#[cfg(feature = "support_panic_trig")] {
@@ -19,11 +14,6 @@ pub const IS_SUPPORT_PANIC_TRIG: bool = {
1914
}
2015
};
2116

22-
#[doc(hidden)]
23-
#[deprecated(since = "0.1.5", note = "Use `IS_SUPPORT_HOOKFN_TRIG` instead")]
24-
/// Whether the library build flag was used to support hookfn_trig.
25-
pub const SUPPORT_HOOKFN_TRIG: bool = IS_SUPPORT_HOOKFN_TRIG;
26-
2717
/// Whether the library build flag was used to support hookfn_trig.
2818
pub const IS_SUPPORT_HOOKFN_TRIG: bool = {
2919
#[cfg(feature = "support_hookfn_trig")] {
@@ -35,11 +25,6 @@ pub const IS_SUPPORT_HOOKFN_TRIG: bool = {
3525
}
3626
};
3727

38-
#[doc(hidden)]
39-
#[deprecated(since = "0.1.5", note = "Use `IS_SUPPORT_COUNT_TRIG` instead")]
40-
/// Whether the library build flag was used to support count_trig.
41-
pub const SUPPORT_COUNT_TRIG: bool = IS_SUPPORT_COUNT_TRIG;
42-
4328
/// Whether the library build flag was used to support count_trig.
4429
pub const IS_SUPPORT_COUNT_TRIG: bool = {
4530
#[cfg(feature = "support_count_trig")] {
@@ -51,16 +36,6 @@ pub const IS_SUPPORT_COUNT_TRIG: bool = {
5136
}
5237
};
5338

54-
#[doc(hidden)]
55-
#[deprecated(since = "0.1.5", note = "Use `IS_SUPPORT_LOOP_TRIG` instead")]
56-
/// Whether the library build flag was used to support empty_trig.
57-
pub const SUPPORT_EMPTY_TRIG: bool = IS_SUPPORT_LOOP_TRIG;
58-
59-
#[doc(hidden)]
60-
#[deprecated(since = "0.1.5", note = "Use `IS_SUPPORT_LOOP_TRIG` instead")]
61-
/// Whether the library build flag was used to support empty_trig.
62-
pub const IS_SUPPORT_EMPTY_TRIG: bool = IS_SUPPORT_LOOP_TRIG;
63-
6439
/// Whether the library build flag was used to support loop_trig.
6540
pub const IS_SUPPORT_LOOP_TRIG: bool = true;
6641

src/core/hook.rs

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)