|
207 | 207 | //! [good cryptographic hygiene]: https://github.com/veorq/cryptocoding#clean-memory-of-secret-data
|
208 | 208 |
|
209 | 209 | #![no_std]
|
| 210 | +#![cfg_attr(docsrs, feature(doc_cfg))] |
210 | 211 | #![doc(html_root_url = "https://docs.rs/zeroize/1.1.0")]
|
211 | 212 | #![warn(missing_docs, rust_2018_idioms, trivial_casts, unused_qualifications)]
|
212 | 213 |
|
|
215 | 216 | extern crate alloc;
|
216 | 217 |
|
217 | 218 | #[cfg(feature = "zeroize_derive")]
|
| 219 | +#[cfg_attr(docsrs, doc(cfg(feature = "zeroize_derive")))] |
218 | 220 | pub use zeroize_derive::Zeroize;
|
219 | 221 |
|
220 |
| -#[cfg(feature = "zeroize_derive")] |
221 |
| -#[doc(hidden)] |
222 |
| -pub use zeroize_derive::*; |
223 |
| - |
224 | 222 | use core::{ops, ptr, slice::IterMut, sync::atomic};
|
225 | 223 |
|
226 | 224 | #[cfg(feature = "alloc")]
|
@@ -328,6 +326,7 @@ where
|
328 | 326 | }
|
329 | 327 |
|
330 | 328 | #[cfg(feature = "alloc")]
|
| 329 | +#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] |
331 | 330 | impl<Z> Zeroize for Vec<Z>
|
332 | 331 | where
|
333 | 332 | Z: Zeroize,
|
@@ -372,6 +371,7 @@ where
|
372 | 371 | }
|
373 | 372 |
|
374 | 373 | #[cfg(feature = "alloc")]
|
| 374 | +#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] |
375 | 375 | impl Zeroize for String {
|
376 | 376 | fn zeroize(&mut self) {
|
377 | 377 | unsafe { self.as_bytes_mut() }.zeroize();
|
|
0 commit comments